Lumiera
0.pre.03
»edit your freedom«
|
#include "/Werk/devel/lumi/tests/vault/gear/test-chain-load.hpp"
A Generator for synthetic Render Jobs for Scheduler load testing.
Allocates a fixed set of #numNodes and generates connecting topology.
maxFan | maximal fan-in/out from a node, also limits maximal parallel strands. |
Definition at line 249 of file test-chain-load.hpp.
Public Types | |
using | Param = lib::Limited< size_t, maxFan > |
Parameter values limited [0 . More... | |
using | Rule = lib::RandomDraw< NodeControlBinding > |
Topology is governed by rules for random params. | |
Public Member Functions | |
TestChainLoad (size_t nodeCnt=DEFAULT_SIZ) | |
auto | allExitHashes () const |
auto | allExitNodes () |
auto | allLevelWeights () |
calculate node weights aggregated per level | |
auto | allNodePtr () |
auto | allNodes () |
TestChainLoad && | buildTopology () |
Use current configuration and seed to (re)build Node connectivity. More... | |
double | calcExpectedCompoundedWeight (uint concurrency=1) |
calculate the simplified/theoretic reduction of compounded weight through concurrency | |
double | calcRuntimeReference (microseconds timeBase=LOAD_DEFAULT_TIME, size_t sizeBase=0, size_t repeatCnt=GRAPH_BENCHMARK_RUNS) |
Conduct a number of benchmark runs over processing the Graph synchronously. More... | |
size_t | calcWeightSum () |
overall sum of configured node weights | |
TestChainLoad && | clearNodeHashes () |
Clear node hashes and propagate seed value. | |
Statistic | computeGraphStatistics () |
Operator on TestChainLoad to evaluate current graph connectivity. More... | |
TestChainLoad && | configure_isolated_nodes () |
preconfigured topology: only unconnected seed/exit nodes | |
TestChainLoad && | configureShape_chain_loadBursts () |
preconfigured topology: single graph with massive »load bursts« More... | |
TestChainLoad && | configureShape_short_chains2 () |
preconfigured topology: isolated simple 2-step chains | |
TestChainLoad && | configureShape_short_chains3_interleaved () |
preconfigured topology: simple 3-step chains, starting interleaved | |
TestChainLoad && | configureShape_short_segments3_interleaved () |
preconfigured topology: simple interwoven 3-step graph segments | |
TestChainLoad && | expansionRule (Rule r) |
std::string | generateTopologyDOT () |
size_t | getHash () const |
global hash is the combination of all exit node hashes != 0 | |
size_t | getSeed () const |
auto | levelScheduleSequence (uint concurrency=1) |
sequence of the summed compounded weight factors after each level | |
size_t | nodeID (Node const *n) |
size_t | nodeID (Node const &n) |
TestChainLoad && | performGraphSynchronously (microseconds timeBase=LOAD_DEFAULT_TIME, size_t sizeBase=0) |
Emulate complete graph processing in a single threaded loop. More... | |
TestChainLoad && | printRuntimeReference (microseconds timeBase=LOAD_DEFAULT_TIME, size_t sizeBase=0, size_t repeatCnt=GRAPH_BENCHMARK_RUNS) |
TestChainLoad && | printTopologyDOT () |
TestChainLoad && | printTopologyStatistics () |
Print a tabular summary of graph characteristics. More... | |
TestChainLoad && | pruningRule (Rule r) |
TestChainLoad && | recalculate () |
Recalculate all node hashes and propagate seed value. | |
TestChainLoad && | reductionRule (Rule r) |
TestChainLoad && | seedingRule (Rule r) |
TestChainLoad && | setSeed (size_t seed=rani()) |
Set the overall seed value. More... | |
ScheduleCtx | setupSchedule (Scheduler &scheduler) |
establish and configure the context used for scheduling computations. More... | |
TestChainLoad && | setWeight (size_t fixedNodeWeight=1) |
Set a fixed weight for all nodes. More... | |
size_t | size () const |
size_t | topLevel () const |
TestChainLoad && | weightRule (Rule r) |
Static Public Member Functions | |
static Rule | rule () |
Abbreviation for starting rules. | |
static Rule | rule_atJoin (uint v) |
static Rule | rule_atJoin_else (double p1, double p2, uint v=1) |
static Rule | rule_atLink (uint v) |
static Rule | rule_atStart (uint v) |
static Rule | value (size_t v) |
Classes | |
struct | Node |
Graph Data structure. More... | |
class | NodeControlBinding |
Policy/Binding for generation of random parameters by »drawing« based on the node-hash. More... | |
class | ScheduleCtx |
Setup and wiring for a test run to schedule a computation structure as defined by this TestChainLoad instance. More... | |
Friends | |
class | ScheduleCtx |
Private Types | |
using | NodeIT = lib::RangeIter< Node * > |
using | NodeTab = typename Node::Tab |
Private Member Functions | |
Node * | afterNode () |
Node * | backNode () |
Node * | frontNode () |
Private Member Functions inherited from MoveOnly | |
MoveOnly (MoveOnly &&)=default | |
MoveOnly (MoveOnly const &)=delete | |
MoveOnly & | operator= (MoveOnly &&)=delete |
MoveOnly & | operator= (MoveOnly const &)=delete |
Private Attributes | |
Rule | expansionRule_ {} |
std::unique_ptr< Node[]> | nodes_ |
size_t | numNodes_ |
Rule | pruningRule_ {} |
Rule | reductionRule_ {} |
Rule | seedingRule_ {} |
Rule | weightRule_ {} |
using Param = lib::Limited<size_t, maxFan> |
|
inline |
Definition at line 434 of file test-chain-load.hpp.
|
inline |
preconfigured topology: single graph with massive »load bursts«
Definition at line 566 of file test-chain-load.hpp.
Referenced by SchedulerService_test::processSchedule(), SchedulerStress_test::setup_systematicSchedule(), SchedulerStress_test::smokeTest(), and TestChainLoad_test::verify_adjusted_schedule().
|
inline |
Use current configuration and seed to (re)build Node connectivity.
While working in-place, the wiring and thus the resulting hash values are completely rewritten, progressing from start and controlled by evaluating the drawing rules on the current node, computing its hash.
Definition at line 584 of file test-chain-load.hpp.
Referenced by SchedulerStress_test::investigateWorkProcessing(), SchedulerService_test::processSchedule(), SchedulerStress_test::setup_systematicSchedule(), SchedulerStress_test::smokeTest(), TestChainLoad_test::usageExample(), TestChainLoad_test::verify_adjusted_schedule(), and TestChainLoad_test::verify_runtime_reference().
|
inline |
Set the overall seed value.
Definition at line 683 of file test-chain-load.hpp.
|
inline |
Set a fixed weight for all nodes.
Definition at line 695 of file test-chain-load.hpp.
|
inline |
Conduct a number of benchmark runs over processing the Graph synchronously.
Definition at line 801 of file test-chain-load.hpp.
References vault::gear::test::anonymous_namespace{test-chain-load.hpp}::GRAPH_BENCHMARK_RUNS, and vault::gear::test::anonymous_namespace{test-chain-load.hpp}::LOAD_DEFAULT_TIME.
Referenced by TestChainLoad_test::verify_runtime_reference().
TestChainLoad< maxFan > && performGraphSynchronously | ( | microseconds | timeBase = LOAD_DEFAULT_TIME , |
size_t | sizeBase = 0 |
||
) |
Emulate complete graph processing in a single threaded loop.
timeBase | time delay produced by ComputationalLoad at Node.weight==1 ; can be set to zero to disable the synthetic processing load on nodes |
sizeBase | allocation base size used; also causes switch to memory-access based load |
Definition at line 1464 of file test-chain-load.hpp.
References ComputationalLoad::invoke(), and vault::gear::test::anonymous_namespace{test-chain-load.hpp}::LOAD_DEFAULT_MEM_SIZE.
Referenced by TestChainLoad_test::verify_runtime_reference().
|
inline |
Operator on TestChainLoad to evaluate current graph connectivity.
In a pass over the internal storage, all nodes are classified and accounted into a set of categories, thereby evaluating
Definition at line 1171 of file test-chain-load.hpp.
Referenced by SchedulerService_test::processSchedule(), TestChainLoad_test::showcase_Expansion(), and SchedulerStress_test::smokeTest().
|
inline |
Print a tabular summary of graph characteristics.
frac
: the percentage of overall nodes falling into this category∅pS
: averaged per Segment (warning: see below)∅pL
: averaged per Level∅pLW
: count normalised to the width at that level and then averaged per LevelγL◆
: weight centre of this kind of node, relative to the overall graphγLW◆
: the same, but using the level-width-normalised valueγL⬙
: weight centre, but relative to the current subgraph or segmentγLW⬙
: same but using level-width-normalised value Together, these values indicates how the simulated processing load is structured over time, assuming that the »Levels« are processed consecutively in temporal order. The graph can unfold or contract over time, and thus nodes can be clustered irregularly, which can be seen from the weight centres; for that reason, the width-normalised variants of the indicators are also accounted for, since a wider graph also implies that there are more nodes of each kind per level, even while the actual density of this kind did not increase. SEGS
statistics may be misleading, since these count only completely severed and restarted graphs. Definition at line 1254 of file test-chain-load.hpp.
TestChainLoad< maxFan >::ScheduleCtx setupSchedule | ( | Scheduler & | scheduler | ) |
establish and configure the context used for scheduling computations.
Definition at line 2183 of file test-chain-load.hpp.
Referenced by StressTestRig< maxFan >::testSetup().