Class DataBlockStats

Nested Relationships

Nested Types

Class Documentation

class DataBlockStats

Object Oriented class that provides an interface for allocation and destruction of PSRDADA Shared Memory Ring Buffers (SMRB).

Public Types

typedef struct ska::pst::smrb::DataBlockStats::stats stats_t

Statistics of the ring buffer.

Public Functions

explicit DataBlockStats(DataBlock &db)

Construct a new DataBlockStats object.

Parameters

dbDataBlock which will be monitored for statistics

~DataBlockStats() = default

Destroy the DataBlockStats object.

std::string get_header_stats_string()

Return a descriptive string of the header block statistics.

Returns

std::string header block stats string

std::string get_data_stats_string()

Return a descriptive string of the data block statistics.

Returns

std::string data block stats string

void print_stats()

Print the header and data ring statistics to spdlog.

DataBlockStats::stats_t get_header_stats()

Return the header block statistics.

Returns

DataBlockStats::stats_t header block statistics

DataBlockStats::stats_t get_data_stats()

Return the data block statistics.

Returns

DataBlockStats::stats_t

struct stats

Statistics of the ring buffer.

Public Members

uint64_t nbufs

total number of buffers

uint64_t bufsz

size of each buffer in bytes

uint64_t written

total number of buffers written to the ring

uint64_t read

total number of buffers read from the ring

uint64_t full

number of filled buffers in the ring

uint64_t clear

number of cleared buffers in the ring

uint64_t available

number of free buffers in the ring