From eef35257104bddb9a5a7ff2217f2fdaece5490fb Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Tue, 12 Dec 2023 18:22:03 +0100 Subject: [PATCH] Scheduler-test: setup for integration test Basically this is all done and settled already: this is the `usageExample()` from `TestChainLoadTest`. However, the focus is slightly different here: We want a demonstration that the Scheduler can work flawlessly through a massive load. Thus the plan is to use much more challenging parameters, and then lean back and watch what happens.... --- tests/vault/gear/scheduler-service-test.cpp | 48 +++++++++++---- wiki/thinkPad.ichthyo.mm | 68 +++++++++++++++++++-- 2 files changed, 98 insertions(+), 18 deletions(-) diff --git a/tests/vault/gear/scheduler-service-test.cpp b/tests/vault/gear/scheduler-service-test.cpp index 00784b11d..fb07850f4 100644 --- a/tests/vault/gear/scheduler-service-test.cpp +++ b/tests/vault/gear/scheduler-service-test.cpp @@ -435,21 +435,21 @@ namespace test { post (start+t1ms); // But another schedule is placed 1ms behind sleep_for (100us); // wait for "soon" to pass... pullWork(); - CHECK (wasInvoked(start)); // Result: the first invocation happened immediately + CHECK (wasInvoked(start)); // Result: the first invocation happened immediately CHECK (slip_us < 300); - CHECK (delay_us > 900); // yet this thread was afterwards kept in sleep to await the next task; - CHECK (activity::PASS == res); // returns instruction to re-invoke immediately - CHECK (not scheduler.empty()); // since there is still work in the queue + CHECK (delay_us > 900); // yet this thread was afterwards kept in sleep to await the next task; + CHECK (activity::PASS == res); // returns instruction to re-invoke immediately + CHECK (not scheduler.empty()); // since there is still work in the queue - start += t1ms; // (just re-adjust the reference point to calculate slip_us) - pullWork(); // re-invoke immediately as instructed - CHECK (wasInvoked(start)); // Result: also the next Activity has been dispatched - CHECK (slip_us < 400); // not much slip - CHECK (delay_us < 20200); // ...and the post-delay is used to re-shuffle the sleep cycle as usual - CHECK (activity::PASS == res); // since queue is empty, we will call back once... + start += t1ms; // (just re-adjust the reference point to calculate slip_us) + pullWork(); // re-invoke immediately as instructed + CHECK (wasInvoked(start)); // Result: also the next Activity has been dispatched + CHECK (slip_us < 400); // not much slip + CHECK (delay_us < 20200); // ...and the post-delay is used to re-shuffle the sleep cycle as usual + CHECK (activity::PASS == res); // since queue is empty, we will call back once... CHECK (scheduler.empty()); pullWork(); - CHECK (activity::WAIT == res); // and then go to sleep. + CHECK (activity::WAIT == res); // and then go to sleep. cout << "already tended-next => re-target capacity"< + + + + + + + + + + + + + - - - + + + + + + @@ -91219,12 +91235,24 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - - + + + + + + + + + + + + + + + @@ -93336,6 +93364,32 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -96052,6 +96106,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ @@ -96928,6 +96983,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+