Pipeline controller: plan 2 (hard +, error +50 %), backlog throttle, 2 trajectory workers, stop rules, summaries every 50; budget reserve

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Kral
2026-10-05 13:35:54 +02:00
parent 1c4667a0fc
commit 13360292dd
781 changed files with 50211 additions and 22 deletions

View File

@@ -0,0 +1,16 @@
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Bike usage'
define view entity {{P}}I_BIKE_USE
as select from {{p}}bike as bike
inner join {{p}}ride as ride on ride.bike_id = bike.bike_id
{
key bike.bike_id as bike_id,
bike.station as station,
count( * ) as ride_count,
sum( ride.distance_km ) as total_distance
}
group by
bike.bike_id,
bike.station
having
sum( ride.distance_km ) > 50.0

View File

@@ -0,0 +1,47 @@
CLASS {{p}}t_bike_test DEFINITION PUBLIC FINAL CREATE PUBLIC
FOR TESTING DURATION SHORT RISK LEVEL HARMLESS.
PRIVATE SECTION.
CLASS-DATA go_env TYPE REF TO if_cds_test_environment.
CLASS-METHODS class_setup.
CLASS-METHODS class_teardown.
METHODS setup.
METHODS heavy_bike_only FOR TESTING.
METHODS light_bike_hidden FOR TESTING.
ENDCLASS.
CLASS {{p}}t_bike_test IMPLEMENTATION.
METHOD class_setup.
go_env = cl_cds_test_environment=>create( i_for_entity = '{{P}}I_BIKE_USE' ).
ENDMETHOD.
METHOD class_teardown.
go_env->destroy( ).
ENDMETHOD.
METHOD setup.
DATA lt_bike TYPE STANDARD TABLE OF {{p}}bike WITH EMPTY KEY.
DATA lt_ride TYPE STANDARD TABLE OF {{p}}ride WITH EMPTY KEY.
go_env->clear_doubles( ).
lt_bike = VALUE #( ( bike_id = 'B1' station = 'NORD' bike_type = 'E' )
( bike_id = 'B2' station = 'SUED' bike_type = 'C' ) ).
lt_ride = VALUE #( ( ride_id = 'R1' bike_id = 'B1' ride_date = '20240101' distance_km = '60.0' )
( ride_id = 'R2' bike_id = 'B2' ride_date = '20240102' distance_km = '20.0' ) ).
go_env->insert_test_data( lt_bike ).
go_env->insert_test_data( lt_ride ).
ENDMETHOD.
METHOD heavy_bike_only.
SELECT COUNT(*) FROM {{p}}i_bike_use INTO @DATA(lv_rows).
cl_abap_unit_assert=>assert_equals( exp = 1 act = lv_rows ).
ENDMETHOD.
METHOD light_bike_hidden.
SELECT SINGLE ride_count, total_distance FROM {{p}}i_bike_use WHERE bike_id = 'B1'
INTO @DATA(ls_use).
cl_abap_unit_assert=>assert_equals( exp = 1 act = ls_use-ride_count ).
cl_abap_unit_assert=>assert_equals(
exp = CONV decfloat34( '60.0' )
act = CONV decfloat34( ls_use-total_distance ) ).
ENDMETHOD.
ENDCLASS.