Lumiera
0.pre.03
»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 of
staleStep*sizeBase` is used, and the number of repetitions is chosen such as to match the given timing goal. timeBase
and sizeBase
of the intended usage. The calibration watches processing speed in a microbenchmark with LOAD_BENCHMARK_RUNS
repetitions; the result is stored in a static variable and can thus be reused. Definition at line 1319 of file test-chain-load.hpp.
Public Member Functions | |
double | benchmark (uint scaleStep=1) |
void | calibrate () |
double | invoke (uint scaleStep=1) |
cause a delay by computational load | |
bool | isCalibrated () const |
void | maybeCalibrate () |
Public Attributes | |
size_t | sizeBase = LOAD_DEFAULT_MEM_SIZE |
microseconds | timeBase = LOAD_DEFAULT_TIME |
bool | useAllocation = false |
Private Types | |
using | Sink = volatile size_t |
Private Member Functions | |
auto | allocNeeded (uint scaleStep) |
void | causeComputationLoad (uint scaleStep) |
void | causeMemProcessLoad (uint scaleStep) |
double | determineSpeed () |
void | performIncrementalCalibration () |
uint64_t | roundsNeeded (uint scaleStep) |
Private Member Functions inherited from MoveAssign | |
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) |
|
inlinestaticprivate |
mem | in iterations/µs |
Definition at line 1325 of file test-chain-load.hpp.
References vault::gear::test::anonymous_namespace{test-chain-load.hpp}::LOAD_DEFAULT_MEM_SIZE, vault::gear::test::anonymous_namespace{test-chain-load.hpp}::LOAD_DEFAULT_TIME, and vault::gear::test::anonymous_namespace{test-chain-load.hpp}::LOAD_SPEED_BASELINE.
|
inline |
Definition at line 1349 of file test-chain-load.hpp.
Referenced by TestChainLoad_test::verify_computation_load().