FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::venues::WireLatencyRecorder Class Reference

#include <fastmm/venues/wire_latency.hpp>

Public Member Functions

FASTMM_FORCE_INLINE void record (Cycles t0, Cycles before_encode, Cycles after_encode, Cycles after_send) noexcept
 
void begin_batch () noexcept
 
bool batch_full () const noexcept
 
void end_batch (Cycles after_send, bool sent) noexcept
 sent: the batch's write succeeded (or was queued); false drops the kept stamps.
 
LogLinearHistogram encode () const noexcept
 The session's samples.
 
LogLinearHistogram send () const noexcept
 
LogLinearHistogram tick_to_trade () const noexcept
 
void summarize (const TscCalibration &c, WireLatencyStats &tick_to_trade, WireLatencyStats &encode, WireLatencyStats &send) const noexcept
 Percentiles in ns under c's TSC rate (also set when only constant_tsc is present); without a rate only the counts are filled in.
 
void summarize (const TscCalibration &c, std::int64_t now_ns, WireLatencyStats &tick_to_trade, WireLatencyStats &encode, WireLatencyStats &send, WireLatencyWindow &last_minute, WireLatencyWindow &last_hour) noexcept
 The same, after closing the slices now_ns (the venue's clock) has passed, and for the last minute and the last hour too.
 
void reset () noexcept
 

Static Public Attributes

static constexpr std::size_t kMaxBatch = 64
 

Member Function Documentation

◆ record()

FASTMM_FORCE_INLINE void fastmm::venues::WireLatencyRecorder::record ( Cycles  t0,
Cycles  before_encode,
Cycles  after_encode,
Cycles  after_send 
)
inlinenoexcept

◆ begin_batch()

void fastmm::venues::WireLatencyRecorder::begin_batch ( )
inlinenoexcept

◆ batch_full()

bool fastmm::venues::WireLatencyRecorder::batch_full ( ) const
inlinenoexcept

◆ end_batch()

void fastmm::venues::WireLatencyRecorder::end_batch ( Cycles  after_send,
bool  sent 
)
inlinenoexcept

sent: the batch's write succeeded (or was queued); false drops the kept stamps.

◆ encode()

LogLinearHistogram fastmm::venues::WireLatencyRecorder::encode ( ) const
inlinenoexcept

The session's samples.

◆ send()

LogLinearHistogram fastmm::venues::WireLatencyRecorder::send ( ) const
inlinenoexcept

◆ tick_to_trade()

LogLinearHistogram fastmm::venues::WireLatencyRecorder::tick_to_trade ( ) const
inlinenoexcept

◆ summarize() [1/2]

void fastmm::venues::WireLatencyRecorder::summarize ( const TscCalibration &  c,
WireLatencyStats &  tick_to_trade,
WireLatencyStats &  encode,
WireLatencyStats &  send 
) const
inlinenoexcept

Percentiles in ns under c's TSC rate (also set when only constant_tsc is present); without a rate only the counts are filled in.

The session's samples.

◆ summarize() [2/2]

void fastmm::venues::WireLatencyRecorder::summarize ( const TscCalibration &  c,
std::int64_t  now_ns,
WireLatencyStats &  tick_to_trade,
WireLatencyStats &  encode,
WireLatencyStats &  send,
WireLatencyWindow &  last_minute,
WireLatencyWindow &  last_hour 
)
inlinenoexcept

The same, after closing the slices now_ns (the venue's clock) has passed, and for the last minute and the last hour too.

◆ reset()

void fastmm::venues::WireLatencyRecorder::reset ( )
inlinenoexcept

Member Data Documentation

◆ kMaxBatch

constexpr std::size_t fastmm::venues::WireLatencyRecorder::kMaxBatch = 64
staticconstexpr