StormByte-Buffer 4.0.0
C++26 buffer module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Buffer::Telemetry::OperationSample Class Reference

Measures one operation with an independent Base clock sample. More...

#include <StormByte/buffer/telemetry.hxx>

Public Member Functions

 OperationSample (const OperationSample &)=delete
 Copy construction is disabled.
 OperationSample (OperationSample &&other) noexcept
 Transfers the active sample.
OperationSample & operator= (const OperationSample &)=delete
 Copy assignment is disabled.
OperationSample & operator= (OperationSample &&)=delete
 Move assignment is disabled.
 ~OperationSample () noexcept
 Stops the sample and records a committed operation.
void Commit (StormByte::ByteSize bytes) noexcept
 Includes this sample in the rate calculation.

Friends

class Telemetry

Detailed Description

Measures one operation with an independent Base clock sample.

Note
The sample borrows its owning Telemetry; it must not outlive it.

Constructor & Destructor Documentation

◆ OperationSample() [1/2]

StormByte::Buffer::Telemetry::OperationSample::OperationSample ( const OperationSample & )
delete

Copy construction is disabled.

◆ OperationSample() [2/2]

StormByte::Buffer::Telemetry::OperationSample::OperationSample ( OperationSample && other)
noexcept

Transfers the active sample.

Parameters
otherSample to take.

◆ ~OperationSample()

StormByte::Buffer::Telemetry::OperationSample::~OperationSample ( )
noexcept

Stops the sample and records a committed operation.

Member Function Documentation

◆ Commit()

void StormByte::Buffer::Telemetry::OperationSample::Commit ( StormByte::ByteSize bytes)
noexcept

Includes this sample in the rate calculation.

Parameters
bytesBytes delivered or accepted by the operation.

◆ operator=() [1/2]

OperationSample & StormByte::Buffer::Telemetry::OperationSample::operator= ( const OperationSample & )
delete

Copy assignment is disabled.

◆ operator=() [2/2]

OperationSample & StormByte::Buffer::Telemetry::OperationSample::operator= ( OperationSample && )
delete

Move assignment is disabled.

◆ Telemetry

friend class Telemetry
friend

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