diff --git a/src/lib/gnuplot-gen.cpp b/src/lib/gnuplot-gen.cpp index 9a470e1b5..84387b6b4 100644 --- a/src/lib/gnuplot-gen.cpp +++ b/src/lib/gnuplot-gen.cpp @@ -93,7 +93,7 @@ set style line 3 linetype 2 linewidth 2 linecolor rgb '#0B7FCC' set style line 4 linetype 6 linewidth 2 linecolor rgb '#37999D' set style line 5 linetype 7 linewidth 2 linecolor rgb '#248269' set style line 6 linetype 13 linewidth 2 linecolor rgb '#00C443' -set style line 7 linetype 12 linewidth 2 linecolor rgb '#B86E1C' +set style line 7 linetype 12 linewidth 2 linecolor rgb '#EBE83E' set style line 8 linetype 5 linewidth 2 linecolor rgb '#762C14' set style line 9 linetype 4 linewidth 2 linecolor rgb '#AA0519' @@ -150,8 +150,7 @@ ${if Xrange} set xrange [${Xrange}] ${endif }${if Yrange} set yrange [${Yrange}] ${endif -} -set key autotitle columnheader tmargin +}set key autotitle columnheader tmargin )~"; @@ -172,7 +171,10 @@ ${else }# regression line function derived from data regLine(x) = STATS_slope * x + STATS_intercept ${end if -} +}# +regLabel = sprintf("Model: %3.2f·p + %3.2f", STATS_slope, STATS_intercept) + +set key horizontal width -4 ${if Xtics }set xtics ${Xtics} ${else}${if Xrange}${else @@ -193,14 +195,14 @@ if (plots > 1) { # ####---------Scatter-Regression-Plot------------- plot $RunData using 1:2 with points linestyle 1, \ - regLine(x) with line linestyle 9 + regLine(x) with line linestyle 9 title regLabel if (plots > 1) { # switch off decorations for secondary diagram unset arrow 10 unset arrow 11 set border 2+8 - set key bmargin + set key bmargin vertical ${if Y2range} set yrange [${Y2range}] ${endif} diff --git a/tests/vault/gear/scheduler-stress-test.cpp b/tests/vault/gear/scheduler-stress-test.cpp index 5789d6f67..6e72f471f 100644 --- a/tests/vault/gear/scheduler-stress-test.cpp +++ b/tests/vault/gear/scheduler-stress-test.cpp @@ -32,7 +32,6 @@ #include "lib/time/timevalue.hpp" #include "lib/format-string.hpp" #include "lib/format-cout.hpp" -#include "lib/gnuplot-gen.hpp" #include "lib/test/diagnostic-output.hpp"//////////////////////////TODO work in distress //#include "lib/format-string.hpp" #include "lib/test/transiently.hpp" @@ -391,11 +390,11 @@ namespace test { cpuLoad.calibrate(); //////////////////////////////////////////////////////////////////TODO for development only MARK_TEST_FUN - TestChainLoad testLoad{64}; - testLoad.configure_isolated_nodes() - .buildTopology() - .printTopologyDOT() - .printTopologyStatistics(); +// TestChainLoad testLoad{64}; +// testLoad.configure_isolated_nodes() +// .buildTopology() +// .printTopologyDOT() +// .printTopologyStatistics(); struct Setup : StressRig, bench::LoadPeak_ParamRange_Evaluation @@ -418,10 +417,8 @@ namespace test { auto results = StressRig::with() .perform (2,64); - auto csv = results.renderCSV(); - cout << csv < +#include #include -//#include -//#include #include #include #include @@ -551,14 +548,14 @@ namespace test { Column time {"result time"}; Column conc {"concurrency"}; Column jobtime {"avg jobtime"}; - Column overhead{"overhead"}; + Column impeded {"avg impeded"}; auto allColumns() { return std::tie(param ,time ,conc ,jobtime - ,overhead + ,impeded ); } }; @@ -573,8 +570,30 @@ namespace test { data.param = param; data.time = stat.coveredTime / 1000; data.conc = stat.avgConcurrency; - data.jobtime = stat.activeTime/stat.activationCnt; - data.overhead = stat.timeAtConc(1) / stat.activationCnt; ////OOO not really clear if sensible + data.jobtime = stat.activeTime / stat.activationCnt; + data.impeded = (stat.timeAtConc(1) + stat.timeAtConc(0))/stat.activationCnt; + } + + + static string + renderGnuplot (Table const& results) + { + using namespace lib::gnuplot_gen; + string csv = results.renderCSV(); + Param maxParam = * std::max_element (results.param.data.begin(), results.param.data.end()); + Param xtics = maxParam > 500? 50 + : maxParam > 200? 20 + : maxParam > 100? 10 + : 5; + return scatterRegression( + ParamRecord().set (KEY_CSVData, csv) + .set (KEY_TermSize, "600,600") + .set (KEY_Xtics, int64_t(xtics)) + .set (KEY_Xlabel, "load size ⟶ number of jobs") + .set (KEY_Ylabel, "active time ⟶ ms") + .set (KEY_Y2label, "concurrent threads ⟶") + .set (KEY_Y3label, "avg job time ⟶ µs") + ); } }; // diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index a82d92e35..1d33c8510 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -111897,7 +111897,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -111941,7 +111941,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -112033,8 +112033,18 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - + + + + + + +

+ Darstellung als Gnuplot-Diagramm aufbereitet +

+ +
+
@@ -112057,9 +112067,9 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - - + + + @@ -114722,8 +114732,8 @@ std::cout << tmpl.render({"what", "World"}) << s - - + + @@ -114732,7 +114742,7 @@ std::cout << tmpl.render({"what", "World"}) << s - + @@ -114799,7 +114809,7 @@ std::cout << tmpl.render({"what", "World"}) << s - + @@ -114825,6 +114835,38 @@ std::cout << tmpl.render({"what", "World"}) << s + + + + + + + + + + + +

+ Denn es gibt stets einige wenige ganz dramatische Ausreißer, die sonst die Skala so verschieben würden, daß man die eigentlichen Meßwerte nicht mehr sieht; ich müßte also eigens wieder Anpassungs-Code schreiben, und mir eine Heuristik einfallen lassen, um die Skala zu kappen — unnötiger Aufwand für eine nebenbei mit aufgenommene Größe +

+ + +
+
+ + + + + + +

+ ...denn der Umstand, daß der Overhead / Job weitgehend konstant ist, zeigt, daß wir hier einen separaten Setup-Effekt haben, vermutlich nämlich vor allem die Job-Planungs-Zeit. Da wir demgegenüber in der aktiven Phase sehr gut linear sind, kann man diesen zusätzlichen Overhead zunächst mal als Artefakt der Meßanordnung beiseite lassen (und später dann mal eigens untersuchen) +

+ + +
+
+
@@ -114849,7 +114891,9 @@ std::cout << tmpl.render({"what", "World"}) << s - + + + @@ -115049,8 +115093,7 @@ std::cout << tmpl.render({"what", "World"}) << s Fazit: knapp am Abgrund vorbei

- - + @@ -115066,8 +115109,7 @@ std::cout << tmpl.render({"what", "World"}) << s und sind leicht anpassbar

- - +
@@ -115080,7 +115122,7 @@ std::cout << tmpl.render({"what", "World"}) << s
- + @@ -115089,15 +115131,30 @@ std::cout << tmpl.render({"what", "World"}) << s - - - + + + + + + + - - + + - - + + + + + + + + + + + + + @@ -115342,9 +115399,9 @@ std::cout << tmpl.render({"what", "World"}) << s - - - + + +