- 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.
|
template<class BAR , size_t nThreads> |
double | performanceTest () |
|
virtual void | run (Arg) |
|
|
virtual | ~Test ()=default |
| this is an interface
|
|
lib::Random | makeRandGen () |
| build a dedicated new RandomGen, seeded from the default-Gen
|
|
virtual void | run (Arg arg)=0 |
|
void | seedRand () |
| draw a new random seed from a common nucleus, and re-seed the default-Gen.
|
|
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
|
|
◆ run()
- Test:
- performance investigation of N-fold synchronisation barrier
- 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.
The documentation for this class was generated from the following file: