42namespace orrery::backend {
49using Clock = std::chrono::steady_clock;
114 total += worker.busy;
123 total += worker.idle;
136 if (total.count() == 0) {
139 return static_cast<double>(
idle().count()) /
static_cast<double>(total.count());
An allocator that starts every allocation on a cache line.
The whole pool's record.
Definition worker_statistics.hpp:99
double idle_fraction() const noexcept
The fraction of available worker time that was spent waiting.
Definition worker_statistics.hpp:134
Duration elapsed
Wall time spent inside parallel regions, measured by the submitting thread.
Definition worker_statistics.hpp:105
Duration idle() const noexcept
Idle time summed over workers.
Definition worker_statistics.hpp:120
Duration busy() const noexcept
Busy time summed over workers.
Definition worker_statistics.hpp:111
std::vector< WorkerStatistics > workers
One entry per worker, in worker order.
Definition worker_statistics.hpp:101
std::uint64_t regions
How many parallel regions have run.
Definition worker_statistics.hpp:108
One worker's record, on a cache line of its own.
Definition worker_statistics.hpp:94
One worker's record, accumulated over every region since the last reset.
Definition worker_statistics.hpp:56
Duration busy
Time spent inside the caller's work.
Definition worker_statistics.hpp:79
std::uint64_t chunks
How many chunks of work this worker executed.
Definition worker_statistics.hpp:58
std::uint64_t steals
How many of those chunks were taken from another worker's range.
Definition worker_statistics.hpp:76
Duration idle
Time inside a parallel region spent not working, as defined above.
Definition worker_statistics.hpp:82
std::uint64_t items
How many items those chunks covered, an item being one index of the range the caller asked to have di...
Definition worker_statistics.hpp:68
std::chrono::nanoseconds Duration
Durations are stored in nanoseconds so that they add without conversion and mean the same thing on ev...
Definition worker_statistics.hpp:53
std::chrono::steady_clock Clock
The clock every duration here is measured on.
Definition worker_statistics.hpp:49