Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
AdviceMultiplicity_test Class Reference

Description

Test:
stress test for the Advice system: Concurrently add a multitude of advice provisions and check correct matching and dispatch of all advice.
Todo:
advanced topic, deferred for now (4/10) ////////////////////TICKET #610
See also
advice.hpp
AdviceBasics_test

Definition at line 66 of file advice-multiplicity-test.cpp.

Private Member Functions

virtual void run (Arg)
 
void check_highLoadSimpleMatch ()
 
void check_multipleMatch ()
 
void check_unlockedDispatch ()
 

Member Function Documentation

◆ run()

virtual void run ( Arg  )
inlineprivatevirtual

Definition at line 70 of file advice-multiplicity-test.cpp.

References AdviceMultiplicity_test::check_highLoadSimpleMatch(), AdviceMultiplicity_test::check_multipleMatch(), and AdviceMultiplicity_test::check_unlockedDispatch().

+ Here is the call graph for this function:

◆ check_highLoadSimpleMatch()

void check_highLoadSimpleMatch ( )
inlineprivate
Test:
run simple pairs of collaborators in multiple threads. Intentionally, there should be just a single match per pair, but the timings of provision and pickup are chosen randomly

Definition at line 83 of file advice-multiplicity-test.cpp.

Referenced by AdviceMultiplicity_test::run().

+ Here is the caller graph for this function:

◆ check_multipleMatch()

void check_multipleMatch ( )
inlineprivate
Test:
here, one advice might reach multiple advised entities and one entity may receive multiple pieces of advice, overwriting previous advice provisions. The receiving clients (advised entities) are polling irregularly, but finally should each pick up the correct value. To check this, advice values are generated with a specific pattern, which can be check summed

Definition at line 97 of file advice-multiplicity-test.cpp.

Referenced by AdviceMultiplicity_test::run().

+ Here is the caller graph for this function:

◆ check_unlockedDispatch()

void check_unlockedDispatch ( )
inlineprivate
Test:
when dispatching Advice, some of the locking can be left out. Obviously this means we can't be sure anymore the client will see the newly dispatched piece of advice. But the main focus of this test is to ensure the advice system itself is working properly even without complete locking. To verify the results, each thread performs a kind of "flush" (actually creates a memory barrier) before picking up the final value

Definition at line 113 of file advice-multiplicity-test.cpp.

Referenced by AdviceMultiplicity_test::run().

+ Here is the caller graph for this function:
+ Inheritance diagram for AdviceMultiplicity_test:
+ Collaboration diagram for AdviceMultiplicity_test:

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