6 namespace blockchain_monitoring {
21 my = std::make_shared<detail::blockchain_statistics_api_impl>(ctx.
app);
30 return my->_app.chain_database()->with_read_lock([&]() {
return my->get_stats_for_time(open, interval); });
34 const fc::time_point_sec& end)
const
36 return my->_app.chain_database()->with_read_lock(
42 return my->_app.chain_database()->with_read_lock([&]() {
return my->get_lifetime_stats(); });
#define BLOCKCHAIN_MONITORING_PLUGIN_NAME
blockchain_statistics_api(const scorum::app::api_context &ctx)
blockchain_statistics_api_impl(scorum::app::application &app)
statistics get_stats_for_interval(const fc::time_point_sec &start, const fc::time_point_sec &stop) const
Aggregates statistics over a time interval.
statistics 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.
statistics get_lifetime_stats() const
Returns lifetime statistics.