5 namespace blockchain_monitoring {
20 std::shared_ptr<blockchain_monitoring_plugin>
get_plugin()
const
33 _my = std::make_shared<detail::node_monitoring_api_impl>(ctx.
app);
42 return _my->_app.chain_database()->with_read_lock(
48 return _my->_app.chain_database()->with_read_lock(
49 [&]() {
return uint32_t(_my->_app.chain_database()->get_free_memory() / (1024 * 1024)); });
53 return _my->_app.chain_database()->with_read_lock(
54 [&]() {
return uint32_t(_my->_app.chain_database()->get_size() / (1024 * 1024)); });
#define BLOCKCHAIN_MONITORING_PLUGIN_NAME
std::shared_ptr< abstract_plugin > get_plugin(const std::string &name) const
scorum::app::application & _app
node_monitoring_api_impl(scorum::app::application &app)
std::shared_ptr< blockchain_monitoring_plugin > get_plugin() const
node_monitoring_api(const scorum::app::api_context &ctx)
uint32_t get_total_shared_memory_mb() const
uint32_t get_last_block_duration_microseconds() const
Returns last block processing duration in microseconds.
uint32_t get_free_shared_memory_mb() const