StormByte-Buffer 2.0.0
C++26 buffer module of the StormByte suite
 
Loading...
Searching...
No Matches
StormByte::Buffer::Telemetry Class Referenceabstract

Buffer session counters layered on Base's named clocks. More...

#include <StormByte/buffer/telemetry.hxx>

Inheritance diagram for StormByte::Buffer::Telemetry:
Collaboration diagram for StormByte::Buffer::Telemetry:

Classes

class  OperationSample
 Measures one operation with a Base named clock. More...
 

Public Member Functions

virtual ~Telemetry () noexcept
 Virtual destructor.
 
StormByte::ByteSize MeanRate () const noexcept
 Effective mean rate of requested user operations.
 
OperationSample MeasureOperation ()
 Starts measuring an operation with Base's named clock drawer.
 
virtual operator StormByte::Safe::String () const =0
 Flatten counters.
 
STORMBYTE_FORCE_INLINE operator std::string () const
 Flatten via StormByte::Safe::String in this TU.
 
- Public Member Functions inherited from StormByte::Telemetry
virtual operator Safe::String () const=0
 
STORMBYTE_FORCE_INLINE operator std::string () const
 

Protected Member Functions

 Telemetry () noexcept
 Construct all counters at 0.
 
 Telemetry (const Telemetry &)=delete
 
 Telemetry (Telemetry &&)=delete
 
Telemetry & operator= (const Telemetry &)=delete
 
Telemetry & operator= (Telemetry &&)=delete
 
void RecordOperation (StormByte::ByteSize bytes, std::chrono::microseconds elapsed) noexcept
 Accumulate the committed bytes and duration from a Base clock.
 
- Protected Member Functions inherited from StormByte::Telemetry
 Telemetry () noexcept
 
 Telemetry (const Telemetry &)=delete
 
 Telemetry (Telemetry &&other) noexcept
 
Telemetry & operator= (const Telemetry &)=delete
 
Telemetry & operator= (Telemetry &&other) noexcept
 
class Clock & Clock (std::string_view name) noexcept
 
const class Clock & Clock (std::string_view name) const noexcept
 

Friends

class Bridge
 

Detailed Description

Buffer session counters layered on Base's named clocks.

MeanRate
Octets per second of requested user operations, not of the device. A cache Write can look like GiB/s; that is the caller rate, not a disk benchmark. Worker, GC and backpressure enter only when they delay that call. Explicit Flush / Close Flush pull the rate back when the origin works.

Not wall time from Open. 0 until an operation has a non-zero duration. Flatten prints StormByte::ByteSize IEC text plus "/s".

Rate accumulators are atomic. Each concurrent thread/depth receives a distinct Base clock so the clock's Start/Stop pair is not shared.

Constructor & Destructor Documentation

◆ ~Telemetry()

virtual StormByte::Buffer::Telemetry::~Telemetry ( )
virtualnoexcept

Virtual destructor.

Out-of-line for the DLL boundary.

Reimplemented from StormByte::Telemetry.

◆ Telemetry() [1/3]

StormByte::Buffer::Telemetry::Telemetry ( )
protectednoexcept

Construct all counters at 0.

◆ Telemetry() [2/3]

StormByte::Buffer::Telemetry::Telemetry ( const Telemetry &  )
protecteddelete

◆ Telemetry() [3/3]

StormByte::Buffer::Telemetry::Telemetry ( Telemetry &&  )
protecteddelete

Member Function Documentation

◆ MeanRate()

StormByte::ByteSize StormByte::Buffer::Telemetry::MeanRate ( ) const
noexcept

Effective mean rate of requested user operations.

Returns
Octets per second. 0 if no timed operation yet.

Not origin throughput.

◆ MeasureOperation()

OperationSample StormByte::Buffer::Telemetry::MeasureOperation ( )

Starts measuring an operation with Base's named clock drawer.

Returns
A scope sample. Call Commit only when the operation counts.

◆ operator std::string()

STORMBYTE_FORCE_INLINE StormByte::Buffer::Telemetry::operator std::string ( ) const
inline

Flatten via StormByte::Safe::String in this TU.

Returns
std::string on the caller heap.

◆ operator StormByte::Safe::String()

virtual StormByte::Buffer::Telemetry::operator StormByte::Safe::String ( ) const
pure virtual

◆ operator=() [1/2]

Telemetry & StormByte::Buffer::Telemetry::operator= ( const Telemetry &  )
protecteddelete

◆ operator=() [2/2]

Telemetry & StormByte::Buffer::Telemetry::operator= ( Telemetry &&  )
protecteddelete

◆ RecordOperation()

void StormByte::Buffer::Telemetry::RecordOperation ( StormByte::ByteSize  bytes,
std::chrono::microseconds  elapsed 
)
protectednoexcept

Accumulate the committed bytes and duration from a Base clock.

Parameters
bytesOctets this operation delivered or accepted.
elapsedDuration recorded by its named Base clock.

Friends And Related Symbol Documentation

◆ Bridge

friend class Bridge
friend

The documentation for this class was generated from the following file: