Scorum
Classes
Blockchain statistics API

Provide api to get statistics over the time window length. More...

Classes

struct  scorum::blockchain_monitoring::base_metric
 
struct  scorum::blockchain_monitoring::total_metric
 
struct  scorum::blockchain_monitoring::statistics
 

Public API

statistics scorum::blockchain_monitoring::blockchain_statistics_api::get_stats_for_time (const fc::time_point_sec &open, uint32_t interval) const
 Gets statistics over the time window length, interval, that contains time, open. More...
 
statistics scorum::blockchain_monitoring::blockchain_statistics_api::get_stats_for_interval (const fc::time_point_sec &start, const fc::time_point_sec &stop) const
 Aggregates statistics over a time interval. More...
 
statistics scorum::blockchain_monitoring::blockchain_statistics_api::get_lifetime_stats () const
 Returns lifetime statistics. More...
 

Detailed Description

Provide api to get statistics over the time window length.

Require: blockchain_monitoring_plugin

Function Documentation

◆ get_lifetime_stats()

statistics scorum::blockchain_monitoring::blockchain_statistics_api::get_lifetime_stats ( ) const

Returns lifetime statistics.

Definition at line 40 of file blockchain_statistics_api.cpp.

◆ get_stats_for_interval()

statistics scorum::blockchain_monitoring::blockchain_statistics_api::get_stats_for_interval ( const fc::time_point_sec &  start,
const fc::time_point_sec &  stop 
) const

Aggregates statistics over a time interval.

Parameters
startThe beginning time of the window.
stopThe end time of the window. stop must take place after start.
Returns
Aggregated statistics over the interval.

Definition at line 33 of file blockchain_statistics_api.cpp.

◆ get_stats_for_time()

statistics scorum::blockchain_monitoring::blockchain_statistics_api::get_stats_for_time ( const fc::time_point_sec &  open,
uint32_t  interval 
) const

Gets statistics over the time window length, interval, that contains time, open.

Parameters
openThe opening time, or a time contained within the window.
intervalThe size of the window for which statistics were aggregated.
Returns
Statistics for the window.

Definition at line 28 of file blockchain_statistics_api.cpp.