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 timer_->resetCpuTimeIncrement();
168 if (!suspend_ && timer_)
170 times_[idx] += timer_->cpuTimeIncrement();
233 static void report(
const int reportLevel = 0);
A 1D vector of objects of type <T> with a fixed length <N>.
Timers and values for simple (simplistic) mpi-profiling. The entire class behaves as a singleton.
static void addReduceTime()
Add time increment to reduce time.
static double times(const timingType idx)
Access to the timing information for given timing category.
static void addBroadcastTime()
Add time increment to broadcast time.
static void disable() noexcept
Remove timer for measuring communication activity. Does not affect times/counts.
static void addAllToAllTime()
Add time increment to allToAll time.
FixedList< double, timingType::nCategories > timingList
Fixed-size container for timing values.
static void addOtherTime()
Add time increment to other time.
static void enable()
Create timer for measuring communication or un-suspend existing.
static void addScatterTime()
Add time increment to scatter time.
static void beginTiming()
Update timer prior to measurement.
static void addWaitTime()
Add time increment to wait time.
static countList & counts() noexcept
Access to the timing counts.
static void addGatherTime()
Add time increment to gather time.
timingType
The enumerated timing categories (for times and counts arrays).
static uint64_t counts(const timingType idx)
Access to the count for given timing category.
static void addRequestTime()
Add time increment to request time.
static void resume() noexcept
Resume use of timer (if previously active).
static bool active() noexcept
True if timer is active (ie, enabled and not suspended).
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 addTime(const timingType idx)
Add time increment.
static timingList & times() noexcept
Access to the timing information.
static void addProbeTime()
Add time increment to probe time.
static bool suspend() noexcept
Suspend use of timer. Return old status.
static double elapsedTime()
The total of times.
limits reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL))