Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
data::BackendCounters Class Reference

Holds statistics about the backend. More...

#include <BackendCounters.hpp>

Public Types

using PtrType = std::shared_ptr<BackendCounters>
 

Public Member Functions

void registerTooBusy ()
 Register that the backend was too busy to process a request.
 
void registerWriteSync (std::chrono::steady_clock::time_point startTime)
 Register that a write operation was started.
 
void registerWriteSyncRetry ()
 Register that a write operation was retried.
 
void registerWriteStarted ()
 Register that a write operation was started.
 
void registerWriteFinished (std::chrono::steady_clock::time_point startTime)
 Register that a write operation was finished.
 
void registerWriteRetry ()
 Register that a write operation was retried.
 
void registerReadStarted (std::uint64_t count=1u)
 Register that one or more read operations were started.
 
void registerReadFinished (std::chrono::steady_clock::time_point startTime, std::uint64_t count=1u)
 Register that one or more read operations were finished.
 
void registerReadRetry (std::uint64_t count=1u)
 Register that one or more read operations were retried.
 
void registerReadError (std::uint64_t count=1u)
 Register that one or more read operations had an error.
 
boost::json::object report () const
 Get a report of the backend counters.
 

Static Public Member Functions

static PtrType make ()
 Create a new BackendCounters object.
 

Detailed Description

Holds statistics about the backend.

Note
This class is thread-safe.

Member Function Documentation

◆ make()

BackendCounters::PtrType data::BackendCounters::make ( )
static

Create a new BackendCounters object.

Returns
A shared pointer to the new BackendCounters object

◆ registerReadError()

void data::BackendCounters::registerReadError ( std::uint64_t count = 1u)

Register that one or more read operations had an error.

Parameters
countThe number of operations with an error

◆ registerReadFinished()

void data::BackendCounters::registerReadFinished ( std::chrono::steady_clock::time_point startTime,
std::uint64_t count = 1u )

Register that one or more read operations were finished.

Parameters
startTimeThe time the operations were started
countThe number of operations finished

◆ registerReadRetry()

void data::BackendCounters::registerReadRetry ( std::uint64_t count = 1u)

Register that one or more read operations were retried.

Parameters
countThe number of operations retried

◆ registerReadStarted()

void data::BackendCounters::registerReadStarted ( std::uint64_t count = 1u)

Register that one or more read operations were started.

Parameters
countThe number of operations started

◆ registerWriteFinished()

void data::BackendCounters::registerWriteFinished ( std::chrono::steady_clock::time_point startTime)

Register that a write operation was finished.

Parameters
startTimeThe time the operation was started

◆ registerWriteSync()

void data::BackendCounters::registerWriteSync ( std::chrono::steady_clock::time_point startTime)

Register that a write operation was started.

Parameters
startTimeThe time the operation was started

◆ report()

boost::json::object data::BackendCounters::report ( ) const

Get a report of the backend counters.

Returns
The report

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