Lumiera  0.pre.03
»edit your freedom«
TestChainLoad_test Class Reference

Description

Test:
verify a tool to generate synthetic load for Scheduler tests.
Remarks
statistics output and the generation of Graphviz-DOT diagrams is commented out; these diagnostics are crucial to understand the generated load pattern or to develop new graph shapes. Visualise graph with dot -Tpng example.dot | display
See also
SchedulerService_test
SchedulerStress_test

Definition at line 62 of file test-chain-load-test.cpp.

Private Member Functions

virtual void run (Arg)
 
void showcase_Expansion ()
 
void showcase_PruneChains ()
 
void showcase_Reduction ()
 
void showcase_SeedChains ()
 
void showcase_StablePattern ()
 
void usageExample ()
 
void verify_adjusted_schedule ()
 
void verify_computation_load ()
 
void verify_Node ()
 
void verify_reseed_recalculate ()
 
void verify_runtime_reference ()
 
void verify_scheduling_setup ()
 
void verify_Topology ()
 

Member Function Documentation

◆ usageExample()

void usageExample ( )
inlineprivate
Test:
demonstrate simple usage of the test-load
  • build a graph with 64 nodes, grouped into small segments
  • use a scheduler instance to »perform« this graph

Definition at line 90 of file test-chain-load-test.cpp.

References TestChainLoad< maxFan >::buildTopology(), and TestChainLoad< maxFan >::configureShape_short_segments3_interleaved().

+ Here is the call graph for this function:

◆ verify_Node()

void verify_Node ( )
inlineprivate
Test:
data structure to represent a computation Node

Definition at line 117 of file test-chain-load-test.cpp.

◆ verify_Topology()

void verify_Topology ( )
inlineprivate
Test:
build topology by connecting the nodes
  • pre-allocate a block with 32 nodes and then build a topology to connect these, using default rules
  • in the default case, nodes are linearly chained
  • hash is also computed by chaining with predecessor hash
  • hash computations can be reproduced

Definition at line 202 of file test-chain-load-test.cpp.

◆ showcase_Expansion()

void showcase_Expansion ( )
inlineprivate
Test:
demonstrate shaping of generated topology
  • the expansion rule injects forking nodes
  • after some expansion, width limitation is enforced
  • thus join nodes are introduced to keep all chains connected
  • by default, the hash controls shape, evolving identical in each branch
  • with additional shuffling, the decisions are more random
  • statistics can be computed to characterise the graph
  • the graph can be visualised as Graphviz diagram

Definition at line 262 of file test-chain-load-test.cpp.

References TestChainLoad< maxFan >::computeGraphStatistics(), vault::gear::test::STAT_EXIT, vault::gear::test::STAT_FORK, vault::gear::test::STAT_JOIN, vault::gear::test::STAT_NODE, and vault::gear::test::STAT_SEED.

+ Here is the call graph for this function:

◆ showcase_Reduction()

void showcase_Reduction ( )
inlineprivate
Test:
demonstrate impact of reduction on graph topology
  • after one fixed initial expansion, reduction causes all chains to be joined eventually
  • expansion and reduction can counterbalance each other, leading to localised »packages« of branchings and reductions

Definition at line 334 of file test-chain-load-test.cpp.

References vault::gear::test::STAT_FORK, vault::gear::test::STAT_JOIN, and vault::gear::test::STAT_NODE.

◆ showcase_SeedChains()

void showcase_SeedChains ( )
inlineprivate
Test:
demonstrate shaping of generated topology by seeding new chains
  • the seed rule allows to start new chains in the middle of the graph
  • combined with with reduction, the emerging structure resembles the processing pattern encountered with real media calculations

Definition at line 403 of file test-chain-load-test.cpp.

References vault::gear::test::STAT_FORK, vault::gear::test::STAT_JOIN, vault::gear::test::STAT_LINK, vault::gear::test::STAT_NODE, and vault::gear::test::STAT_SEED.

◆ showcase_PruneChains()

void showcase_PruneChains ( )
inlineprivate
Test:
demonstrate topology with pruning and multiple segments
  • the prune rule terminates chains randomly
  • this can lead to fragmentation into several sub-graphs
  • these can be completely segregated, or appear interwoven
  • equilibrium of seeding and pruning can be established

Definition at line 460 of file test-chain-load-test.cpp.

References vault::gear::test::STAT_EXIT, vault::gear::test::STAT_FORK, vault::gear::test::STAT_JOIN, vault::gear::test::STAT_LINK, vault::gear::test::STAT_NODE, and vault::gear::test::STAT_SEED.

◆ showcase_StablePattern()

void showcase_StablePattern ( )
inlineprivate
Test:
examples of realistic stable processing patterns
  • some cases achieve a real equilibrium
  • other examples' structure is slowly expanding and become stable under constriction of width
  • some examples go into a stable repetitive loop
  • injecting additional randomness generates a chaotic yet stationary flow of similar patterns
Note
these examples use a larger pre-allocation of nodes to demonstrate the stable state; because, towards end, a tear-down into one single exit node will be enforced.
Remarks
creating any usable example is a matter of experimentation; the usual starting point is to balance expanding and contracting forces; yet generation can either run-away or suffocate, and so the task is to find a combination of seed values and slight parameter variations leading into repeated re-establishment of some node constellation. When this is achieved, additional shuffling can be introduced to uncover further potential.

Definition at line 599 of file test-chain-load-test.cpp.

References vault::gear::test::STAT_EXIT, vault::gear::test::STAT_FORK, vault::gear::test::STAT_JOIN, vault::gear::test::STAT_KNOT, vault::gear::test::STAT_LINK, vault::gear::test::STAT_NODE, and vault::gear::test::STAT_SEED.

◆ verify_computation_load()

void verify_computation_load ( )
inlineprivate
Test:
verify calibration of a configurable computational load.

Definition at line 860 of file test-chain-load-test.cpp.

References ComputationalLoad::benchmark(), and ComputationalLoad::invoke().

+ Here is the call graph for this function:

◆ verify_reseed_recalculate()

void verify_reseed_recalculate ( )
inlineprivate
Test:
set and propagate seed values and recalculate all node hashes.
Remarks
This test uses parameter rules with some expansion and a pruning rule with 60% probability. This setup is known to create a sequence of tiny isolated trees with 4 nodes each; there are 8 such groups, each with a fork and two exit nodes. The following code traverses all nodes grouped into 4-node clusters to verify the regular pattern and calculated hashes.

Definition at line 924 of file test-chain-load-test.cpp.

◆ verify_runtime_reference()

void verify_runtime_reference ( )
inlineprivate
Test:
compute synchronous execution time for reference

Definition at line 1007 of file test-chain-load-test.cpp.

References TestChainLoad< maxFan >::buildTopology(), TestChainLoad< maxFan >::calcRuntimeReference(), TestChainLoad< maxFan >::clearNodeHashes(), TestChainLoad< maxFan >::configureShape_short_segments3_interleaved(), and TestChainLoad< maxFan >::performGraphSynchronously().

+ Here is the call graph for this function:

◆ verify_adjusted_schedule()

void verify_adjusted_schedule ( )
inlineprivate
Test:
verify use of computation weights and topology to establish a predicted load pattern, which can be used to construct a schedule adapted to the expected load.
Remarks
use printTopologyDOT() and then dot -Tpng xx.dot|display to understand the numbers in context of the topology

Definition at line 1071 of file test-chain-load-test.cpp.

References TestChainLoad< maxFan >::allLevelWeights(), TestChainLoad< maxFan >::buildTopology(), and TestChainLoad< maxFan >::configureShape_chain_loadBursts().

+ Here is the call graph for this function:

◆ verify_scheduling_setup()

void verify_scheduling_setup ( )
inlineprivate
Test:
setup for running a chain-load as scheduled task
  • running an isolated Node recalculation
  • dispatch of this recalculation packaged as render job
  • verify the planning job, which processes nodes in batches; for the test, the callback-λ will not invoke the Scheduler, but rather use the instructions to create clone nodes; if all nodes are processed and all dependency connections properly reported through the callback-λ, then calculating this clone network should reproduce the original hash.

Definition at line 1207 of file test-chain-load-test.cpp.

+ Inheritance diagram for TestChainLoad_test:
+ Collaboration diagram for TestChainLoad_test:

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