Scheduler-test: experiment with varying stress levels

This commit is contained in:
Fischlurch 2024-01-02 15:45:40 +01:00
parent bb2bbc0e02
commit 0c9485294e
3 changed files with 74 additions and 7 deletions

View file

@ -33,7 +33,7 @@
#include "lib/format-cout.hpp"
#include "lib/test/diagnostic-output.hpp"//////////////////////////TODO work in distress
//#include "lib/format-string.hpp"
//#include "lib/test/transiently.hpp"
#include "lib/test/transiently.hpp"
//#include "lib/test/microbenchmark.hpp"
//#include "lib/util.hpp"
@ -75,6 +75,7 @@ namespace test {
{
//smokeTest();
setup_systematicSchedule();
search_breaking_point();
generalFuckup();
walkingDeadline();
}
@ -145,7 +146,6 @@ namespace test {
void
setup_systematicSchedule()
{
MARK_TEST_FUN
TestChainLoad testLoad{64};
testLoad.configureShape_chain_loadBursts()
.buildToplolgy()
@ -271,15 +271,60 @@ SHOW_EXPR(micros);
CHECK (stepStr(26) == "lev:26 stepFac:26.967 schedule:44.944"_expect);
CHECK (stepStr(27) == "lev:27 stepFac:27.967 schedule:46.611"_expect);
// perform a Test with this low stress level (0.3)
double runTime = testSetup.launch_and_wait();
double expected = testSetup.getExpectedEndTime();
CHECK (fabs (runTime-expected) < 5000);
} // Scheduler should able to follow the expected schedule
/** @test TODO determine the breaking point towards scheduler overload
* @todo WIP 1/24 🔁 define implement
*/
void
search_breaking_point()
{
MARK_TEST_FUN
TestChainLoad testLoad{64};
testLoad.configureShape_chain_loadBursts()
.buildToplolgy()
// .printTopologyDOT()
// .printTopologyStatistics()
;
micros = testSetup.launch_and_wait();
SHOW_EXPR(micros);
// Adapted Schedule----------
TRANSIENTLY(work::Config::COMPUTATION_CAPACITY) = 4;
auto LOAD_BASE = 500us;
double stressFac = 0.6;
uint concurrency = 4;
// Build-Performance-test-setup--------
BlockFlowAlloc bFlow;
EngineObserver watch;
Scheduler scheduler{bFlow, watch};
auto testSetup =
testLoad.setupSchedule(scheduler)
.withLoadTimeBase(LOAD_BASE)
.withJobDeadline(50ms)
.withUpfrontPlanning()
.withAdaptedSchedule(stressFac, concurrency);
double refTime = testLoad.calcRuntimeReference(LOAD_BASE);
SHOW_EXPR(refTime);
double runTime = testSetup.launch_and_wait();
SHOW_EXPR(runTime);
double expTime = testSetup.getExpectedEndTime();
SHOW_EXPR(expTime);
SHOW_EXPR(runTime-expTime)
}
/** @test TODO
* @todo WIP 12/23 🔁 define implement
* @todo WIP 1/24 🔁 define implement
*/
void
generalFuckup()
@ -290,7 +335,7 @@ SHOW_EXPR(micros);
/** @test TODO
* @todo WIP 12/23 🔁 define implement
* @todo WIP 1/24 🔁 define implement
*/
void
walkingDeadline()

View file

@ -1760,10 +1760,16 @@ namespace test {
return lib::explore(startTimes_)
.transform([&](Time jobTime) -> TimeVar
{
return jobTime - startTimes_[0];
return jobTime - startTimes_.front();
});
}
double
getExpectedEndTime()
{
return _raw(startTimes_.back() - startTimes_.front());
}
/* ===== Setter / builders for custom configuration ===== */

View file

@ -107775,8 +107775,24 @@ Date:&#160;&#160;&#160;Thu Apr 20 18:53:17 2023 +0200<br/>
</html></richcontent>
<icon BUILTIN="idea"/>
</node>
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1704204926475" ID="ID_1456624838" MODIFIED="1704205121657" TEXT="Problem: Hardware-Abh&#xe4;ngigkeit">
<icon BUILTIN="messagebox_warning"/>
<node CREATED="1704204937210" ID="ID_125449622" MODIFIED="1704204955523" TEXT="die maximale Concurrency h&#xe4;ngt vom System ab"/>
<node CREATED="1704204956871" ID="ID_1273413790" MODIFIED="1704204972921" TEXT="man k&#xf6;nnte die Concurrency stark beschr&#xe4;nkten (z.B. auf 4)"/>
<node CREATED="1704204974141" ID="ID_276875371" MODIFIED="1704205001773" TEXT="damit nimmt aber der Einflu&#xdf; von Contention-Effekten deutlich ab"/>
<node BACKGROUND_COLOR="#ccb59b" COLOR="#6e2a38" CREATED="1704205015111" ID="ID_1836181306" MODIFIED="1704205027191" TEXT="es geht derzeit nur um Grundlagen">
<font ITALIC="true" NAME="SansSerif" SIZE="14"/>
<icon BUILTIN="yes"/>
<node CREATED="1704205038615" ID="ID_1530818646" MODIFIED="1704205054230" TEXT="eine systematische Untersuchung ist explizit in die Zukunft verschoben"/>
<node CREATED="1704205054890" ID="ID_1934999423" MODIFIED="1704205071460" TEXT="aktuell mu&#xdf; ich nur grundlegende M&#xe4;ngel im Design erkennen"/>
<node CREATED="1704205072208" ID="ID_1142932347" MODIFIED="1704205114885" TEXT="daher teste ich mit meinem System auf voller Leistung (8 Kerne)"/>
<node CREATED="1704205086169" ID="ID_903640160" MODIFIED="1704205137872" TEXT="wenn&apos;s woanders bricht schauen wir uns das dann an"/>
</node>
</node>
<node BACKGROUND_COLOR="#f0d5c5" COLOR="#990033" CREATED="1704130775228" ID="ID_1335708273" MODIFIED="1704130795750" TEXT="Untersuchung: den &#xbb;breaking point&#xab; identifizieren....?">
<icon BUILTIN="help"/>
<node CREATED="1704206510327" ID="ID_40492887" MODIFIED="1704206560860" TEXT="erster Eindruck: bei steigendem Druck geht Zeit asymptotisch gegen einen Sockelwert"/>
<node CREATED="1704206563512" ID="ID_366217988" MODIFIED="1704206579674" TEXT="Problem dabei: starke zuf&#xe4;llige Schwankungen"/>
</node>
</node>
</node>