![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "/Werk/devel/lumi/tests/vault/gear/test-chain-load.hpp"
A calibratable CPU load to be invoked from a node job functor.
Two distinct methods for load generation are provided
volatile The timeBase multiplied with the given scaleStep´ determines the actual run time. When using the _memory method_ (useAllocation), a heap block ofstaleStep*sizeBaseis used, and the number of repetitions is chosen such as to match the given timing goal. @note since performance depends on the platform, it is mandatory to invoke the [self calibration](\ref ComputationalLoad::calibrate) at least once prior to use. Performing the calibration with default base settings is acceptable, since mostly the overall expense is growing linearly; obviously the calibration is more precisely however when using the actualtimeBaseandsizeBaseof the intended usage. The calibration watches processing speed in a microbenchmark withLOAD_BENCHMARK_RUNS` repetitions; the result is stored in a static variable and can thus be reused. Definition at line 1310 of file test-chain-load.hpp.
Public Attributes | |
| microseconds | timeBase = LOAD_DEFAULT_TIME |
| size_t | sizeBase = LOAD_DEFAULT_MEM_SIZE |
| bool | useAllocation = false |
Public Member Functions | |
| double | invoke (uint scaleStep=1) |
| cause a delay by computational load | |
| double | benchmark (uint scaleStep=1) |
| void | calibrate () |
| void | maybeCalibrate () |
| bool | isCalibrated () const |
Private Types | |
| using | Sink = volatile size_t |
Private Member Functions | |
| uint64_t | roundsNeeded (uint scaleStep) |
| auto | allocNeeded (uint scaleStep) |
| void | causeComputationLoad (uint scaleStep) |
| void | causeMemProcessLoad (uint scaleStep) |
| double | determineSpeed () |
| void | performIncrementalCalibration () |
Private Member Functions inherited from MoveAssign | |
| ~MoveAssign ()=default | |
| MoveAssign ()=default | |
| MoveAssign (MoveAssign &&)=default | |
| MoveAssign (MoveAssign const &)=delete | |
| MoveAssign & | operator= (MoveAssign &&)=default |
| MoveAssign & | operator= (MoveAssign const &)=delete |
Static Private Member Functions | |
| static double & | computationSpeed (bool mem) |
|
private |
Definition at line 1313 of file test-chain-load.hpp.
|
inlinestaticprivate |
| mem | in iterations/µs |
Definition at line 1316 of file test-chain-load.hpp.
Referenced by ComputationalLoad::isCalibrated(), ComputationalLoad::performIncrementalCalibration(), and ComputationalLoad::roundsNeeded().
Here is the caller graph for this function:
|
inline |
cause a delay by computational load
Definition at line 1330 of file test-chain-load.hpp.
References ComputationalLoad::causeComputationLoad(), ComputationalLoad::causeMemProcessLoad(), ComputationalLoad::timeBase, and ComputationalLoad::useAllocation.
Referenced by ComputationalLoad::benchmark(), RandomChainCalcFunctor< maxFan >::invokeJobOperation(), vault::gear::test::onetimeCrunch(), TestChainLoad< maxFan >::performGraphSynchronously(), SchedulerStress_test::setup_systematicSchedule(), and TestChainLoad_test::verify_computation_load().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 1340 of file test-chain-load.hpp.
References ComputationalLoad::invoke().
Referenced by ComputationalLoad::determineSpeed(), and TestChainLoad_test::verify_computation_load().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 1348 of file test-chain-load.hpp.
References ComputationalLoad::performIncrementalCalibration(), TRANSIENTLY, and ComputationalLoad::useAllocation.
Referenced by ComputationalLoad::maybeCalibrate(), SchedulerStress_test::setup_systematicSchedule(), and TestChainLoad_test::verify_computation_load().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 1357 of file test-chain-load.hpp.
References ComputationalLoad::calibrate(), and ComputationalLoad::isCalibrated().
Referenced by vault::gear::test::onetimeCrunch(), and TestChainLoad< maxFan >::performGraphSynchronously().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 1364 of file test-chain-load.hpp.
References ComputationalLoad::computationSpeed().
Referenced by ComputationalLoad::maybeCalibrate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 1371 of file test-chain-load.hpp.
References ComputationalLoad::computationSpeed(), ComputationalLoad::timeBase, and ComputationalLoad::useAllocation.
Referenced by ComputationalLoad::allocNeeded(), ComputationalLoad::causeComputationLoad(), and ComputationalLoad::determineSpeed().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 1378 of file test-chain-load.hpp.
References ComputationalLoad::roundsNeeded(), and ComputationalLoad::sizeBase.
Referenced by ComputationalLoad::causeMemProcessLoad().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 1389 of file test-chain-load.hpp.
References lib::hash::combine(), and ComputationalLoad::roundsNeeded().
Referenced by ComputationalLoad::invoke().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 1401 of file test-chain-load.hpp.
References ComputationalLoad::allocNeeded(), and UninitialisedDynBlock< T >::front().
Referenced by ComputationalLoad::invoke().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 1415 of file test-chain-load.hpp.
References ComputationalLoad::benchmark(), and ComputationalLoad::roundsNeeded().
Referenced by ComputationalLoad::performIncrementalCalibration().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 1424 of file test-chain-load.hpp.
References ComputationalLoad::computationSpeed(), ComputationalLoad::determineSpeed(), and ComputationalLoad::useAllocation.
Referenced by ComputationalLoad::calibrate().
Here is the call graph for this function:
Here is the caller graph for this function:| microseconds timeBase = LOAD_DEFAULT_TIME |
Definition at line 1324 of file test-chain-load.hpp.
Referenced by ComputationalLoad::invoke(), vault::gear::test::onetimeCrunch(), TestChainLoad< maxFan >::performGraphSynchronously(), ComputationalLoad::roundsNeeded(), SchedulerStress_test::setup_systematicSchedule(), and TestChainLoad_test::verify_computation_load().
| size_t sizeBase = LOAD_DEFAULT_MEM_SIZE |
Definition at line 1325 of file test-chain-load.hpp.
Referenced by ComputationalLoad::allocNeeded(), TestChainLoad< maxFan >::performGraphSynchronously(), and TestChainLoad_test::verify_computation_load().
| bool useAllocation = false |
Definition at line 1326 of file test-chain-load.hpp.
Referenced by ComputationalLoad::calibrate(), ComputationalLoad::invoke(), TestChainLoad< maxFan >::performGraphSynchronously(), ComputationalLoad::performIncrementalCalibration(), ComputationalLoad::roundsNeeded(), and TestChainLoad_test::verify_computation_load().
Inheritance diagram for ComputationalLoad:
Collaboration diagram for ComputationalLoad: