Activity-Lang: complete execution of the basic CalculationJob scheme

...assembled from parts already implemented

TODO
 - need a way to access the »current scheduler time«
 - need builder extension points to connect notifications
This commit is contained in:
Fischlurch 2023-08-30 23:57:07 +02:00
parent 32c08c0307
commit 07fcc89e6a
2 changed files with 62 additions and 11 deletions

View file

@ -456,11 +456,39 @@ namespace test {
/** @test TODO usage scenario: Activity graph for a render job
* @todo WIP 8/23 🔁 define implement
* - build a activity term based on the »CalculationJob« wiring template
* - dispatch the generated Activity chain and verify sequence of invocations
* @todo WIP 8/23 🔁 define 🔁 implement
*/
void
scenario_RenderJob()
{
Time nominal{7,7};
Time start{0,1};
Time dead{0,10};
Time now{555,5};
ActivityDetector detector;
Job testJob{detector.buildMockJob("testJob", nominal, 12345)};
BlockFlowAlloc bFlow;
ActivityLang activityLang{bFlow};
auto term = activityLang.buildCalculationJob (testJob, start,dead);
Activity& anchor = term.post();
// insert instrumentation to trace activation
detector.watchGate (anchor.next, "theGate");
CHECK (activity::PASS == ActivityLang::dispatchChain (anchor, now, detector.executionCtx));
CHECK (detector.verifyInvocation("theGate").arg("5.555 ⧐ Act(GATE")
.beforeInvocation("after-theGate").arg("⧐ Act(WORKSTART")
.beforeInvocation("CTX-work").arg("5.555","")
.beforeInvocation("testJob") .arg("7.007",12345)
.beforeInvocation("CTX-done").arg("5.555",""));
cout << detector.showLog()<<endl;
}

View file

@ -77912,8 +77912,8 @@ Date:&#160;&#160;&#160;Thu Apr 20 18:53:17 2023 +0200<br/>
<icon BUILTIN="button_ok"/>
</node>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1693316292138" ID="ID_1313498082" MODIFIED="1693316304515" TEXT="Ausf&#xfc;hrungs-Logik">
<icon BUILTIN="flag-yellow"/>
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1693316292138" ID="ID_1313498082" MODIFIED="1693440864259" TEXT="Ausf&#xfc;hrungs-Logik">
<icon BUILTIN="pencil"/>
<node BACKGROUND_COLOR="#f0d5c5" COLOR="#990033" CREATED="1693316312133" ID="ID_1707163520" MODIFIED="1693316321892" TEXT="Bedeutung des kontextuellen Zeitfensters?">
<icon BUILTIN="help"/>
<node CREATED="1693316323123" ID="ID_118526613" MODIFIED="1693316925262" TEXT="noch nicht recht klar...">
@ -77970,6 +77970,18 @@ Date:&#160;&#160;&#160;Thu Apr 20 18:53:17 2023 +0200<br/>
</node>
<node CREATED="1693426559375" ID="ID_728243970" MODIFIED="1693426583903" TEXT="dispatchChain() : Einstieg &#xfc;ber dispatch(), dann activateChain()"/>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1693440743987" ID="ID_1799625960" MODIFIED="1693440884474" TEXT="Ausf&#xfc;hrung der Kette braucht Zugriff auf aktuelle Scheduler-Zeit">
<richcontent TYPE="NOTE"><html>
<head/>
<body>
<p>
Ein &#955; in den Scheduler binden?
</p>
</body>
</html></richcontent>
<linktarget COLOR="#8a3e44" DESTINATION="ID_1799625960" ENDARROW="Default" ENDINCLINATION="1052;45;" ID="Arrow_ID_1059439556" SOURCE="ID_1663710700" STARTARROW="None" STARTINCLINATION="1063;-39;"/>
<icon BUILTIN="flag-yellow"/>
</node>
<node BACKGROUND_COLOR="#d2beaf" COLOR="#5c4d6e" CREATED="1693345602461" ID="ID_996451340" MODIFIED="1693345626237" TEXT="Dispatch">
<icon BUILTIN="hourglass"/>
<node CREATED="1693345606503" ID="ID_1448505632" MODIFIED="1693345622980" TEXT="realisiert im Scheduler-Commutator (Layer-2)">
@ -77983,8 +77995,7 @@ Date:&#160;&#160;&#160;Thu Apr 20 18:53:17 2023 +0200<br/>
Verwaltung des <b>GroomingToken</b>
</p>
</body>
</html>
</richcontent>
</html></richcontent>
<icon BUILTIN="forward"/>
</node>
<node CREATED="1693345687956" ID="ID_885356569" MODIFIED="1693345702766" TEXT="post() &#x2261; Eingangsverzweigung">
@ -79914,8 +79925,8 @@ Date:&#160;&#160;&#160;Thu Apr 20 18:53:17 2023 +0200<br/>
<icon BUILTIN="button_ok"/>
</node>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689200553782" ID="ID_472609287" MODIFIED="1689200578260" TEXT="scenario_RenderJob">
<icon BUILTIN="flag-yellow"/>
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1689200553782" ID="ID_472609287" MODIFIED="1693440686091" TEXT="scenario_RenderJob">
<icon BUILTIN="pencil"/>
<node COLOR="#338800" CREATED="1693323299522" ID="ID_1282022548" MODIFIED="1693323306513" TEXT="Grundstruktur verdrahten">
<icon BUILTIN="button_ok"/>
</node>
@ -79931,10 +79942,10 @@ Date:&#160;&#160;&#160;Thu Apr 20 18:53:17 2023 +0200<br/>
<icon BUILTIN="flag-yellow"/>
</node>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1693431821078" ID="ID_783748219" MODIFIED="1693431841260" TEXT="sinnvolle Instrumentierung (um Ausf&#xfc;hrungssequenz zeigen zu k&#xf6;nnen)">
<icon BUILTIN="flag-yellow"/>
<node COLOR="#338800" CREATED="1693431821078" ID="ID_783748219" MODIFIED="1693440678716" TEXT="sinnvolle Instrumentierung (um Ausf&#xfc;hrungssequenz zeigen zu k&#xf6;nnen)">
<icon BUILTIN="button_ok"/>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1693431842683" ID="ID_713697304" MODIFIED="1693431894287">
<node COLOR="#338800" CREATED="1693431842683" ID="ID_713697304" MODIFIED="1693440682669">
<richcontent TYPE="NODE"><html>
<head/>
<body>
@ -79943,7 +79954,19 @@ Date:&#160;&#160;&#160;Thu Apr 20 18:53:17 2023 +0200<br/>
</p>
</body>
</html></richcontent>
<icon BUILTIN="flag-yellow"/>
<icon BUILTIN="button_ok"/>
</node>
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1693440702928" ID="ID_1663710700" MODIFIED="1693440884474">
<richcontent TYPE="NODE"><html>
<head/>
<body>
<p>
Erfassen der <i>aktuellen Scheduler-Zeit</i>&#160;verifizieren
</p>
</body>
</html></richcontent>
<arrowlink COLOR="#8a3e44" DESTINATION="ID_1799625960" ENDARROW="Default" ENDINCLINATION="1052;45;" ID="Arrow_ID_1059439556" STARTARROW="None" STARTINCLINATION="1063;-39;"/>
<icon BUILTIN="flag-pink"/>
</node>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689200553782" ID="ID_1346681233" MODIFIED="1689200586861" TEXT="scenario_IOJob">