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....
This commit is contained in:
parent
b987aa2446
commit
eef3525710
2 changed files with 98 additions and 18 deletions
|
|
@ -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"<<endl;
|
||||
|
|
@ -552,7 +552,31 @@ namespace test {
|
|||
processSchedule()
|
||||
{
|
||||
MARK_TEST_FUN
|
||||
UNIMPLEMENTED ("walking Deadline");
|
||||
|
||||
auto testLoad =
|
||||
TestChainLoad{64}
|
||||
.configureShape_short_segments3_interleaved()
|
||||
.buildToplolgy();
|
||||
|
||||
// while building calculation plan graph
|
||||
// node hashes were computed, observing dependencies
|
||||
size_t expectedHash = testLoad.getHash();
|
||||
|
||||
double referenceTime = testLoad.calcRuntimeReference();
|
||||
SHOW_EXPR(referenceTime)
|
||||
testLoad.printTopologyDOT()
|
||||
.printTopologyStatistics()
|
||||
;
|
||||
|
||||
BlockFlowAlloc bFlow;
|
||||
EngineObserver watch;
|
||||
Scheduler scheduler{bFlow, watch};
|
||||
|
||||
testLoad.setupSchedule(scheduler)
|
||||
.launch_and_wait();
|
||||
|
||||
// invocation through Scheduler has reproduced all node hashes
|
||||
CHECK (testLoad.getHash() == expectedHash);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -91191,12 +91191,28 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1697473158929" ID="ID_1723058065" MODIFIED="1697484548083" TEXT="vollständiger Ende-zu-Ende Test incl. WorkForce">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1702404334729" ID="ID_1960405822" LINK="#ID_509932054" MODIFIED="1702404388685" TEXT="brauche dafür eine realistische Test-Last �� TestChainLoad">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1702404395915" ID="ID_149930740" MODIFIED="1702404436176" TEXT="wähle ein Pattern, das den Scheduler massiv unter Druck setzt">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1702404408546" ID="ID_824451295" MODIFIED="1702404436177" TEXT="verwende komplexe Abhängigkeitsbeziehungen">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1702404692612" ID="ID_658875926" MODIFIED="1702404774442" TEXT="Ziele: plausible Verarbeitungs-Zeit und korrektes Ergebnis">
|
||||
<arrowlink COLOR="#ea1c47" DESTINATION="ID_1570400114" ENDARROW="Default" ENDINCLINATION="555;-48;" ID="Arrow_ID_1707243748" STARTARROW="None" STARTINCLINATION="211;10;"/>
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1698245695072" ID="ID_546920051" MODIFIED="1698245698507" TEXT="Test-Setup">
|
||||
<node CREATED="1698245550915" ID="ID_460908396" MODIFIED="1698245557078" TEXT="verwende ActivityDetector"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1698245705360" ID="ID_1236877119" MODIFIED="1698245892414" TEXT="brauche Hintereingang (für direkt gegebene Activities)">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#008873" CREATED="1698245550915" ID="ID_460908396" MODIFIED="1702404075481" TEXT="verwende ActivityDetector"/>
|
||||
<node COLOR="#008873" CREATED="1702403961222" ID="ID_1328746815" MODIFIED="1702404080272" TEXT="verwende TestChainLoad">
|
||||
<arrowlink COLOR="#71c190" DESTINATION="ID_729619994" ENDARROW="Default" ENDINCLINATION="-1770;-114;" ID="Arrow_ID_449071121" STARTARROW="None" STARTINCLINATION="-496;54;"/>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1698245705360" ID="ID_1236877119" MODIFIED="1702404083425" TEXT="brauche Hintereingang (für direkt gegebene Activities)">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fafe99" COLOR="#fa002a" CREATED="1698275299501" ID="ID_1052614531" MODIFIED="1698275445662" TEXT="DAS DING ZUCKT">
|
||||
|
|
@ -91219,12 +91235,24 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</node>
|
||||
</node>
|
||||
<node CREATED="1697758391611" ID="ID_124711923" MODIFIED="1697758397083" TEXT="Fälle">
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1697758425500" ID="ID_1450418166" MODIFIED="1698448262765" TEXT="simpleUsage">
|
||||
<icon BUILTIN="hourglass"/>
|
||||
<node CREATED="1697758440737" ID="ID_1211803424" MODIFIED="1697758454084" TEXT="zeigt hier vor allem was man braucht"/>
|
||||
<node COLOR="#338800" CREATED="1697758425500" FOLDED="true" ID="ID_1450418166" MODIFIED="1702404319963" TEXT="simpleUsage">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#435e98" CREATED="1697758440737" ID="ID_1211803424" MODIFIED="1702404318102" TEXT="zeigt hier vor allem was man braucht">
|
||||
<icon BUILTIN="info"/>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1697842432420" ID="ID_1052962927" MODIFIED="1697842447753" TEXT="Scheduler läßt sich instantiieren">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1702404157731" FOLDED="true" ID="ID_1979120552" MODIFIED="1702404310370" TEXT="einzelnen RenderJob ausführen">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#435e98" CREATED="1702404184976" ID="ID_59417398" MODIFIED="1702404197934" TEXT="verwende hierfür die Hilfsmittel von TestChainLoad">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
<node CREATED="1702404198929" ID="ID_523968745" MODIFIED="1702404229688" TEXT="einmal-wegwerf-Funktor: SpecialJobFun"/>
|
||||
<node CREATED="1702404238944" ID="ID_1156892255" MODIFIED="1702404252580" TEXT="bettet eine geeichte ComputationalLoad ein"/>
|
||||
<node CREATED="1702404259677" ID="ID_1834927576" MODIFIED="1702404289909" TEXT="Job platzieren > 6ms ⟹ Scheduler geht in laufenden Zustand"/>
|
||||
<node CREATED="1702404293084" ID="ID_485578908" MODIFIED="1702404306259" TEXT="dann schlafen und nachher prüfen, ob der Job ausgeführt wurde"/>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1698521856803" FOLDED="true" ID="ID_1548722737" MODIFIED="1698808448838" TEXT="verify_StartStop">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
|
|
@ -93336,6 +93364,32 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1702403947528" ID="ID_1107819283" MODIFIED="1702404679268" TEXT="processSchedule">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#338800" CREATED="1702404464266" ID="ID_1456276838" MODIFIED="1702404590241" TEXT="verwende Setup wie in TestChainLoadTest::usageExample()">
|
||||
<arrowlink COLOR="#3ebe62" DESTINATION="ID_120274201" ENDARROW="Default" ENDINCLINATION="-819;-216;" ID="Arrow_ID_112900177" STARTARROW="None" STARTINCLINATION="495;25;"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1702404592560" ID="ID_1463568935" MODIFIED="1702404676154" TEXT="verwende einen komplexen Abhängigkeits-Graphen">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1702404626940" ID="ID_1892483072" MODIFIED="1702404676154" TEXT="Parametrisierung für zeitweilige Überlastung des Schedulers">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1702404661527" ID="ID_836633665" MODIFIED="1702404676155" TEXT="reales Verhalten beobachten(DUMP)">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1702404721017" ID="ID_1570400114" MODIFIED="1702404774443" TEXT="sinnvolles Gesamtergebnis">
|
||||
<linktarget COLOR="#ea1c47" DESTINATION="ID_1570400114" ENDARROW="Default" ENDINCLINATION="555;-48;" ID="Arrow_ID_1707243748" SOURCE="ID_658875926" STARTARROW="None" STARTINCLINATION="211;10;"/>
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1702404778783" ID="ID_235416187" MODIFIED="1702404853437" TEXT="Hash fehlerfrei">
|
||||
<icon BUILTIN="flag-pink"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1702404841636" ID="ID_1198154660" MODIFIED="1702404853437" TEXT="Zeit nicht exzessiv">
|
||||
<icon BUILTIN="flag-pink"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#5b280f" CREATED="1702233903855" FOLDED="true" ID="ID_135325176" MODIFIED="1702349576130" TEXT="derzeit nichts mehr gebrochen...">
|
||||
<linktarget COLOR="#fd1e2b" DESTINATION="ID_135325176" ENDARROW="Default" ENDINCLINATION="-1191;124;" ID="Arrow_ID_1659622275" SOURCE="ID_1034326065" STARTARROW="Default" STARTINCLINATION="-482;-1288;"/>
|
||||
|
|
@ -96052,6 +96106,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1701906066106" ID="ID_424174148" MODIFIED="1701906077289" TEXT="Scheduler-Funktionstest">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1701906105012" ID="ID_729619994" LINK="#ID_1544079509" MODIFIED="1701980947285" TEXT="TestChainLoad entwickeln">
|
||||
<linktarget COLOR="#71c190" DESTINATION="ID_729619994" ENDARROW="Default" ENDINCLINATION="-1770;-114;" ID="Arrow_ID_449071121" SOURCE="ID_1328746815" STARTARROW="None" STARTINCLINATION="-496;54;"/>
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#338800" CREATED="1702343802187" ID="ID_1802324742" MODIFIED="1702343815748" TEXT="Technologie entwickelt und getestet">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
|
|
@ -96928,6 +96983,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</node>
|
||||
<node BACKGROUND_COLOR="#c8c0b6" COLOR="#338800" CREATED="1701838479658" ID="ID_120274201" MODIFIED="1702330737006" TEXT="usageExample">
|
||||
<linktarget COLOR="#7718bb" DESTINATION="ID_120274201" ENDARROW="Default" ENDINCLINATION="-730;116;" ID="Arrow_ID_573558112" SOURCE="ID_111682569" STARTARROW="None" STARTINCLINATION="-428;0;"/>
|
||||
<linktarget COLOR="#3ebe62" DESTINATION="ID_120274201" ENDARROW="Default" ENDINCLINATION="-819;-216;" ID="Arrow_ID_112900177" SOURCE="ID_1456276838" STARTARROW="None" STARTINCLINATION="495;25;"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node BACKGROUND_COLOR="#c8c0b6" COLOR="#435e98" CREATED="1701838487567" ID="ID_535031858" MODIFIED="1702330670355" TEXT="das ist zugleich ein einfacher Integrations-Test">
|
||||
<icon BUILTIN="yes"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue