![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "lib/incidence-count.hpp"
A recorder for concurrent incidences.
Start and end of individual activations are recorded by direct calls, automatically detecting the thread identity; for further differentiation, an additional caseID can be given. Accumulated observations can be integrated into a statistics evaluation.
Definition at line 65 of file incidence-count.hpp.
Classes | |
| struct | Inc |
| struct | Statistic |
Public Member Functions | |
| IncidenceCount ()=default | |
| IncidenceCount & | expectThreads (uint8_t cnt) |
| IncidenceCount & | expectIncidents (size_t cnt) |
| void | markEnter (uint8_t caseID=0) |
| void | markLeave (uint8_t caseID=0) |
| Statistic | evaluate () |
| Visit all data captured thus far, construct an unified timeline and then compute statistics evaluations to characterise observations. | |
| double | calcCumulatedTime () |
Private Types | |
| using | TIMING_SCALE = std::micro |
| using | Clock = std::chrono::steady_clock |
| using | Instance = decltype(Clock::now()) |
| using | Dur = std::chrono::duration< double, TIMING_SCALE > |
| using | Sequence = vector< Inc > |
| using | Recording = vector< Sequence > |
Private Member Functions | |
| uint8_t | allocateNextSlot () |
| threadsafe allocation of thread/slotID | |
| uint8_t | getMySlot () |
| Sequence & | getMySequence (uint8_t threadID) |
| void | addEntry (uint8_t caseID, bool isLeave) |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
Private Attributes | |
| Recording | rec_ |
| std::atomic_uint8_t | slotID_ {0} |
|
default |
| struct lib::IncidenceCount::Inc |
| Class Members | ||
|---|---|---|
| Instance | when | |
| uint8_t | thread:8 | |
| uint8_t | caseID:8 | |
| bool | isLeave:1 | |
Collaboration diagram for IncidenceCount::Inc:
|
private |
Definition at line 68 of file incidence-count.hpp.
|
private |
Definition at line 69 of file incidence-count.hpp.
|
private |
Definition at line 71 of file incidence-count.hpp.
|
private |
Definition at line 72 of file incidence-count.hpp.
Definition at line 82 of file incidence-count.hpp.
Definition at line 83 of file incidence-count.hpp.
|
inlineprivate |
threadsafe allocation of thread/slotID
Definition at line 91 of file incidence-count.hpp.
References IncidenceCount::slotID_.
Referenced by IncidenceCount::getMySlot().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 97 of file incidence-count.hpp.
References IncidenceCount::allocateNextSlot().
Referenced by IncidenceCount::addEntry().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 105 of file incidence-count.hpp.
References IncidenceCount::rec_.
Referenced by IncidenceCount::addEntry().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 117 of file incidence-count.hpp.
References IncidenceCount::Inc::caseID, IncidenceCount::getMySequence(), IncidenceCount::getMySlot(), IncidenceCount::Inc::isLeave, IncidenceCount::Inc::thread, and IncidenceCount::Inc::when.
Referenced by IncidenceCount::markEnter(), and IncidenceCount::markLeave().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 134 of file incidence-count.hpp.
References IncidenceCount::rec_.
|
inline |
Definition at line 142 of file incidence-count.hpp.
References IncidenceCount::rec_.
|
inline |
Definition at line 154 of file incidence-count.hpp.
References IncidenceCount::addEntry().
Referenced by RandomChainCalcFunctor< maxFan >::invokeJobOperation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 155 of file incidence-count.hpp.
References IncidenceCount::addEntry().
Referenced by RandomChainCalcFunctor< maxFan >::invokeJobOperation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Visit all data captured thus far, construct an unified timeline and then compute statistics evaluations to characterise observations.
Definition at line 207 of file incidence-count.hpp.
References IncidenceCount::Statistic::activationCnt, IncidenceCount::Statistic::activeTime, IncidenceCount::Statistic::avgConcurrency, IncidenceCount::Statistic::caseCntr, IncidenceCount::Statistic::caseTime, IncidenceCount::Statistic::concTime, IncidenceCount::Statistic::coveredTime, IncidenceCount::Statistic::cumulatedTime, IncidenceCount::Statistic::eventCnt, lib::explore(), IncidenceCount::rec_, IncidenceCount::Statistic::thrdCntr, and IncidenceCount::Statistic::thrdTime.
Referenced by IncidenceCount::calcCumulatedTime().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 192 of file incidence-count.hpp.
References IncidenceCount::Statistic::cumulatedTime, and IncidenceCount::evaluate().
Here is the call graph for this function:
|
private |
Definition at line 85 of file incidence-count.hpp.
Referenced by IncidenceCount::evaluate(), IncidenceCount::expectIncidents(), IncidenceCount::expectThreads(), and IncidenceCount::getMySequence().
|
private |
Definition at line 87 of file incidence-count.hpp.
Referenced by IncidenceCount::allocateNextSlot().
Inheritance diagram for IncidenceCount:
Collaboration diagram for IncidenceCount: