xrpld
Loading...
Searching...
No Matches
xrpl::LedgerMaster::Stats Struct Reference

Ledger-age gauges reported to the insight collector. More...

Collaboration diagram for xrpl::LedgerMaster::Stats:

Public Member Functions

template<class Handler>
 Stats (Handler const &handler, beast::insight::Collector::Ptr const &collector)
 Registers the hook and the gauges.

Public Attributes

beast::insight::Hook hook
 Keeps the sampling callback registered for as long as Stats lives.
beast::insight::Gauge validatedLedgerAge
 Age of the validated ledger, in seconds, counted from its sign time; two weeks when there is none.
beast::insight::Gauge publishedLedgerAge
 Age of the published ledger, in seconds; two weeks when there is none.

Detailed Description

Ledger-age gauges reported to the insight collector.

The collector calls the hook, which samples the two ages; nothing here is configurable.

Definition at line 1063 of file LedgerMaster.h.

Constructor & Destructor Documentation

◆ Stats()

template<class Handler>
xrpl::LedgerMaster::Stats::Stats ( Handler const & handler,
beast::insight::Collector::Ptr const & collector )

Registers the hook and the gauges.

Parameters
handlerCallable the collector invokes to sample the gauges.
collectorSink the gauges are reported to.

Definition at line 1072 of file LedgerMaster.h.

Member Data Documentation

◆ hook

beast::insight::Hook xrpl::LedgerMaster::Stats::hook

Keeps the sampling callback registered for as long as Stats lives.

Definition at line 1082 of file LedgerMaster.h.

◆ validatedLedgerAge

beast::insight::Gauge xrpl::LedgerMaster::Stats::validatedLedgerAge

Age of the validated ledger, in seconds, counted from its sign time; two weeks when there is none.

Definition at line 1088 of file LedgerMaster.h.

◆ publishedLedgerAge

beast::insight::Gauge xrpl::LedgerMaster::Stats::publishedLedgerAge

Age of the published ledger, in seconds; two weeks when there is none.

Definition at line 1093 of file LedgerMaster.h.