Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
BreakingPoint< CONF > Class Template Reference

#include "/Werk/devel/lumi/tests/vault/gear/stress-test-rig.hpp"

Description

template<class CONF>
class vault::gear::test::bench::BreakingPoint< CONF >

Specific stress test scheme to determine the »breaking point« where the Scheduler starts to slip.

Definition at line 268 of file stress-test-rig.hpp.

Classes

struct  Res
 

Public Member Functions

auto perform ()
 Launch a measurement sequence to determine the »breaking point« for the configured test load and parametrisation of the Scheduler.
 

Private Types

using TestLoad = CONF::TestLoad
 
using TestSetup = TestLoad::ScheduleCtx
 

Private Member Functions

void configureTest (TestSetup &testSetup, double stressFac)
 prepare the ScheduleCtx for a specifically parametrised test series
 
Res runProbes (TestSetup &testSetup, double stressFac)
 perform a repetition of test runs and compute statistics
 
bool decideBreakPoint (Res &res)
 criterion to decide if this test series constitutes a slipped schedule
 
template<class FUN >
Res conductBinarySearch (FUN &&runTestCase, vector< Res > const &results)
 invoke a binary search to produce a sequence of test series with the goal to narrow down the stressFact where the Schedule slips away.
 
void maybeAdaptScaleEmpirically (TestSetup &testSetup, double stressFac)
 Attempt to factor out some observable properties, which are considered circumstantial and not a direct result of scheduling overheads.
 
void showRun (uint i, double delta, double t, bool over, bool fail)
 
void showStep (Res &res)
 
void showRes (Res &res)
 
void showRef (TestSetup &testSetup)
 

Private Attributes

double adjustmentFac {1.0}
 adaptive scale correction based on observed behaviour
 
size_t gaugeProbes = 3 * CONF::REPETITIONS
 
_Fmt fmtRun_ {"....·%-2d: Δ=%4.1f t=%4.1f %s %s"}
 
_Fmt fmtStep_ { "%4.2f| : ∅Δ=%4.1f±%-4.2f ∅t=%4.1f %s %%%-3.0f -- expect:%4.1fms"}
 
_Fmt fmtResSDv_ {"%9s= %5.2f ±%4.2f%s"}
 
_Fmt fmtResVal_ {"%9s: %5.2f%s"}
 

Class Documentation

◆ vault::gear::test::bench::BreakingPoint::Res

struct vault::gear::test::bench::BreakingPoint::Res
Class Members
double stressFac {0}
double percentOff {0}
double stdDev {0}
double avgDelta {0}
double avgTime {0}
double expTime {0}
+ Collaboration diagram for BreakingPoint< CONF >::Res:

Member Typedef Documentation

◆ TestLoad

template<class CONF >
using TestLoad = CONF::TestLoad
private

Definition at line 271 of file stress-test-rig.hpp.

◆ TestSetup

template<class CONF >
using TestSetup = TestLoad::ScheduleCtx
private

Definition at line 272 of file stress-test-rig.hpp.

Member Function Documentation

◆ configureTest()

template<class CONF >
void configureTest ( TestSetup testSetup,
double  stressFac 
)
inlineprivate

prepare the ScheduleCtx for a specifically parametrised test series

Definition at line 286 of file stress-test-rig.hpp.

References BreakingPoint< CONF >::adjustmentFac.

Referenced by BreakingPoint< CONF >::perform().

+ Here is the caller graph for this function:

◆ runProbes()

template<class CONF >
Res runProbes ( TestSetup testSetup,
double  stressFac 
)
inlineprivate

perform a repetition of test runs and compute statistics

Definition at line 294 of file stress-test-rig.hpp.

References BreakingPoint< CONF >::maybeAdaptScaleEmpirically(), BreakingPoint< CONF >::showRun(), and BreakingPoint< CONF >::showStep().

Referenced by BreakingPoint< CONF >::perform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ decideBreakPoint()

template<class CONF >
bool decideBreakPoint ( Res res)
inlineprivate

criterion to decide if this test series constitutes a slipped schedule

Definition at line 327 of file stress-test-rig.hpp.

References BreakingPoint< CONF >::Res::avgDelta, BreakingPoint< CONF >::Res::percentOff, and BreakingPoint< CONF >::Res::stdDev.

Referenced by BreakingPoint< CONF >::perform(), and BreakingPoint< CONF >::showStep().

+ Here is the caller graph for this function:

◆ conductBinarySearch()

template<class CONF >
template<class FUN >
Res conductBinarySearch ( FUN &&  runTestCase,
vector< Res > const &  results 
)
inlineprivate

invoke a binary search to produce a sequence of test series with the goal to narrow down the stressFact where the Schedule slips away.

Definition at line 341 of file stress-test-rig.hpp.

References BreakingPoint< CONF >::Res::avgDelta, BreakingPoint< CONF >::Res::avgTime, lib::binarySearch_upper(), BreakingPoint< CONF >::Res::expTime, BreakingPoint< CONF >::Res::percentOff, and BreakingPoint< CONF >::Res::stdDev.

Referenced by BreakingPoint< CONF >::perform().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maybeAdaptScaleEmpirically()

template<class CONF >
void maybeAdaptScaleEmpirically ( TestSetup testSetup,
double  stressFac 
)
inlineprivate

Attempt to factor out some observable properties, which are considered circumstantial and not a direct result of scheduling overheads.

The artificial computational load is known to drift towards larger values than calibrated; moreover the actual concurrency achieved can deviate from the heuristic assumptions built into the testing schedule. The latter is problematic to some degree however, since the Scheduler is bound to scale down capacity when idle. To strike a reasonable balance, this adjustment of the measurement scale is done only initially, and when the stress factor is high and some degree of pressure on the scheduler can thus be assumed.

Definition at line 385 of file stress-test-rig.hpp.

References BreakingPoint< CONF >::adjustmentFac, BreakingPoint< CONF >::gaugeProbes, and util::limited().

Referenced by BreakingPoint< CONF >::runProbes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showRun()

template<class CONF >
void showRun ( uint  i,
double  delta,
double  t,
bool  over,
bool  fail 
)
inlineprivate

Definition at line 404 of file stress-test-rig.hpp.

References BreakingPoint< CONF >::fmtRun_.

Referenced by BreakingPoint< CONF >::runProbes().

+ Here is the caller graph for this function:

◆ showStep()

template<class CONF >
void showStep ( Res res)
inlineprivate

Definition at line 412 of file stress-test-rig.hpp.

References BreakingPoint< CONF >::Res::avgDelta, BreakingPoint< CONF >::Res::avgTime, BreakingPoint< CONF >::decideBreakPoint(), BreakingPoint< CONF >::Res::expTime, BreakingPoint< CONF >::fmtStep_, BreakingPoint< CONF >::Res::percentOff, BreakingPoint< CONF >::Res::stdDev, and BreakingPoint< CONF >::Res::stressFac.

Referenced by BreakingPoint< CONF >::runProbes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showRes()

template<class CONF >
void showRes ( Res res)
inlineprivate

◆ showRef()

template<class CONF >
void showRef ( TestSetup testSetup)
inlineprivate

Definition at line 435 of file stress-test-rig.hpp.

References BreakingPoint< CONF >::fmtResVal_.

Referenced by BreakingPoint< CONF >::perform().

+ Here is the caller graph for this function:

◆ perform()

template<class CONF >
auto perform ( )
inline

Launch a measurement sequence to determine the »breaking point« for the configured test load and parametrisation of the Scheduler.

Returns
a tuple [stress-factor, ∅delta, ∅run-time]

Definition at line 451 of file stress-test-rig.hpp.

References BreakingPoint< CONF >::Res::avgDelta, BreakingPoint< CONF >::Res::avgTime, Config::COMPUTATION_CAPACITY, BreakingPoint< CONF >::conductBinarySearch(), BreakingPoint< CONF >::configureTest(), BreakingPoint< CONF >::decideBreakPoint(), BreakingPoint< CONF >::runProbes(), BreakingPoint< CONF >::showRef(), BreakingPoint< CONF >::showRes(), BreakingPoint< CONF >::Res::stressFac, and TRANSIENTLY.

+ Here is the call graph for this function:

Member Data Documentation

◆ adjustmentFac

template<class CONF >
double adjustmentFac {1.0}
private

adaptive scale correction based on observed behaviour

Definition at line 371 of file stress-test-rig.hpp.

Referenced by BreakingPoint< CONF >::configureTest(), and BreakingPoint< CONF >::maybeAdaptScaleEmpirically().

◆ gaugeProbes

template<class CONF >
size_t gaugeProbes = 3 * CONF::REPETITIONS
private

◆ fmtRun_

template<class CONF >
_Fmt fmtRun_ {"....·%-2d: Δ=%4.1f t=%4.1f %s %s"}
private

Definition at line 398 of file stress-test-rig.hpp.

Referenced by BreakingPoint< CONF >::showRun().

◆ fmtStep_

template<class CONF >
_Fmt fmtStep_ { "%4.2f| : ∅Δ=%4.1f±%-4.2f ∅t=%4.1f %s %%%-3.0f -- expect:%4.1fms"}
private

Definition at line 399 of file stress-test-rig.hpp.

Referenced by BreakingPoint< CONF >::showStep().

◆ fmtResSDv_

template<class CONF >
_Fmt fmtResSDv_ {"%9s= %5.2f ±%4.2f%s"}
private

Definition at line 400 of file stress-test-rig.hpp.

Referenced by BreakingPoint< CONF >::showRes().

◆ fmtResVal_

template<class CONF >
_Fmt fmtResVal_ {"%9s: %5.2f%s"}
private
+ Inheritance diagram for BreakingPoint< CONF >:
+ Collaboration diagram for BreakingPoint< CONF >:

The documentation for this class was generated from the following file: