StormByte-Buffer 4.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 independent clock samples. 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 an independent Base clock sample. More...

Public Member Functions

virtual ~Telemetry () noexcept
 Virtual destructor.
StormByte::ByteSize MeanRate () const noexcept
 Effective mean rate of requested user operations.
OperationSample MeasureOperation () noexcept
 Starts an independent measurement on the aggregate operation clock.
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
 Copy construction is disabled to preserve clock ownership.
 Telemetry (Telemetry &&)=delete
 Move construction is disabled while samples may borrow this object.
Telemetry & operator= (const Telemetry &)=delete
 Copy assignment is disabled to preserve clock ownership.
Telemetry & operator= (Telemetry &&)=delete
 Move assignment is disabled while samples may borrow this object.
void RecordOperation (StormByte::ByteSize bytes, std::chrono::microseconds elapsed) noexcept
 Accumulate committed bytes and duration from a Base sample.
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)
class Clock::Sample MeasureClock (std::string_view name) noexcept
const class Clock & Clock (std::string_view name) const

Friends

class Bridge

Detailed Description

Buffer session counters layered on Base's independent clock samples.

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 operation records an independent sample against the stable Buffer.Operation clock name. Built-in counter reads are safe during transfers. Separate reads can describe different instants rather than a single atomic snapshot.

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

Copy construction is disabled to preserve clock ownership.

◆ Telemetry() [3/3]

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

Move construction is disabled while samples may borrow this object.

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 ( )
noexcept

Starts an independent measurement on the aggregate operation clock.

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

Copy assignment is disabled to preserve clock ownership.

◆ operator=() [2/2]

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

Move assignment is disabled while samples may borrow this object.

◆ RecordOperation()

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

Accumulate committed bytes and duration from a Base sample.

Parameters
bytesOctets this operation delivered or accepted.
elapsedDuration recorded by its independent Base sample.

◆ Bridge

friend class Bridge
friend

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