38 #ifndef Foam_profilingPstream_H 39 #define Foam_profilingPstream_H 87 static std::unique_ptr<cpuTime> timer_;
122 suspend_ = bool(timer_);
159 if (!suspend_ && timer_)
161 (void) timer_->cpuTimeIncrement();
168 if (!suspend_ && timer_)
170 times_[idx] += timer_->cpuTimeIncrement();
178 addTime(timingType::BROADCAST);
220 addTime(timingType::ALL_TO_ALL);
233 static void report(
const int reportLevel = 0);
static void addProbeTime()
Add time increment to probe time.
timingType
The enumerated timing categories (for times and counts arrays)
A 1D vector of objects of type <T> with a fixed length <N>.
static void addReduceTime()
Add time increment to reduce time.
static void addWaitTime()
Add time increment to wait time.
Timers and values for simple (simplistic) mpi-profiling. The entire class behaves as a singleton...
static timingList & times() noexcept
Access to the timing information.
static void addOtherTime()
Add time increment to other time.
static void addAllToAllTime()
Add time increment to allToAll time.
static double elapsedTime()
The total of times.
static void addTime(const timingType idx)
Add time increment.
static void addScatterTime()
Add time increment to scatter time.
static countList & counts() noexcept
Access to the timing counts.
static void beginTiming()
Update timer prior to measurement.
static void resume() noexcept
Resume use of timer (if previously active)
static void addRequestTime()
Add time increment to request time.
static void addBroadcastTime()
Add time increment to broadcast time.
static void reset()
Reset times/counts. Does not affect the timer itself.
static void disable() noexcept
Remove timer for measuring communication activity. Does not affect times/counts.
static bool suspend() noexcept
Suspend use of timer. Return old status.
static bool active() noexcept
True if timer is active (ie, enabled and not suspended)
FixedList< double, timingType::nCategories > timingList
Fixed-size container for timing values.
static void addGatherTime()
Add time increment to gather time.
FixedList< uint64_t, timingType::nCategories > countList
Fixed-size container for timing counts.
static void report(const int reportLevel=0)
Report current information. Uses parallel communication!
static void enable()
Create timer for measuring communication or un-suspend existing.