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

Description

Test:
investigate performance of N-fold thread synchronisation.
  • use the multithreaded Microbenchmark
  • use an array of consecutively used barriers, one for each per-thread repetition
  • test function is parametrised for comparison of different barrier implementations
Warning
for actually be useful, this test should be compiled with -O3 and be invoked stand-alone several times, while otherwise system load is low
See also
lib::SyncBarrier
steam::control::DispatcherLoop

Definition at line 91 of file sync-barrier-performance-test.cpp.

Private Member Functions

template<class BAR , size_t nThreads>
double performanceTest ()
 
virtual void run (Arg)
 

Additional Inherited Members

- Static Public Member Functions inherited from Test
static string firstTok (Arg)
 conveniently pick the first token from the argument line
 
static uint firstVal (Arg, uint=1)
 conveniently use some number given as argument, with optional default
 
- Public Member Functions inherited from Test
virtual ~Test ()=default
 this is an interface
 
virtual void run (Arg arg)=0
 
void seedRand ()
 draw a new random seed from a common nucleus, and re-seed the default-Gen.
 
lib::Random makeRandGen ()
 build a dedicated new RandomGen, seeded from the default-Gen
 

Member Function Documentation

◆ performanceTest()

template<class BAR , size_t nThreads>
double performanceTest ( )
inlineprivate

Definition at line 95 of file sync-barrier-performance-test.cpp.

◆ run()

virtual void run ( Arg  )
inlineprivatevirtual
Test:
performance investigation of N-fold synchronisation barrier
Remarks
typical values observed with release-build on a 8-core machine
Note
what we are measuring here is actually the time to catch up for all threads involved, implying we are observing the operational delay introduced by synchronisation, and not an overhead of the implementation technique as such. However — the classical implementation based on Mutex + ConditionVar, which enters a thread sleep state on wait, is slower by orders of magnitude.

Definition at line 137 of file sync-barrier-performance-test.cpp.

+ Inheritance diagram for SyncBarrierPerformance_test:
+ Collaboration diagram for SyncBarrierPerformance_test:

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