join 1.0
lightweight network framework library
Loading...
Searching...
No Matches
statistics.hpp File Reference
#include <join/memory.hpp>
#include <join/clock.hpp>
#include <algorithm>
#include <iomanip>
#include <ostream>
#include <sstream>
#include <limits>
#include <atomic>
#include <cstdint>
Include dependency graph for statistics.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  join::BasicStats< ClockPolicy >
 lock-free, multi-producer-safe performance statistics collector. More...
 
class  join::ScopedStats< Statistics >
 RAII guard that automatically calls start() on construction and stop() on destruction. More...
 

Namespaces

namespace  join
 
namespace  join::details
 

Functions

int join::details::latencyScaleIndex () noexcept
 returns the xalloc index used to store the latency scale on a stream.
 
int join::details::throughputScaleIndex () noexcept
 returns the xalloc index used to store the throughput scale on a stream.
 
std::ostream & join::statsHeader (std::ostream &out)
 print the statistics table header to a stream.
 
std::ostream & join::nsec (std::ostream &out)
 set latency display unit to nanoseconds.
 
std::ostream & join::usec (std::ostream &out)
 set latency display unit to microseconds.
 
std::ostream & join::msec (std::ostream &out)
 set latency display unit to milliseconds.
 
std::ostream & join::sec (std::ostream &out)
 set latency display unit to seconds.
 
std::ostream & join::ops (std::ostream &out)
 set throughput display unit to ops/sec.
 
std::ostream & join::kops (std::ostream &out)
 set throughput display unit to Kops/sec.
 
std::ostream & join::mops (std::ostream &out)
 set throughput display unit to Mops/sec.
 
std::ostream & join::gops (std::ostream &out)
 set throughput display unit to Gops/sec.
 
template<class ClockPolicy >
std::ostream & join::operator<< (std::ostream &out, const BasicStats< ClockPolicy > &statistics)
 stream insertion operator for statistics.
 

Variables

constexpr int join::details::colMetric = 24
 width of the metric name column.
 
constexpr int join::details::colCount = 14
 width of the sample count column.
 
constexpr int join::details::colThroughput = 20
 width of the throughput column.
 
constexpr int join::details::colLatency = 16
 width of the latency columns.
 
constexpr int join::details::colTotal = colMetric + colCount + colThroughput + colLatency * 6
 total table width.