Kagome
Polkadot Runtime Engine in C++17
kagome::metrics::MetricsWatcher Class Referencefinal

#include <metrics_watcher.hpp>

Collaboration diagram for kagome::metrics::MetricsWatcher:

Public Member Functions

 MetricsWatcher (std::shared_ptr< application::AppStateManager > app_state_manager, const application::AppConfiguration &app_config, std::shared_ptr< application::ChainSpec > chain_spec)
 
bool prepare ()
 
bool start ()
 
void stop ()
 

Private Member Functions

outcome::result< uintmax_t > measure_storage_size ()
 

Private Attributes

boost::filesystem::path storage_path_
 
volatile bool shutdown_requested_ = false
 
std::thread thread_
 
metrics::RegistryPtr metrics_registry_
 
metrics::Gaugemetric_storage_size_
 

Detailed Description

Definition at line 19 of file metrics_watcher.hpp.

Constructor & Destructor Documentation

kagome::metrics::MetricsWatcher::MetricsWatcher ( std::shared_ptr< application::AppStateManager app_state_manager,
const application::AppConfiguration app_config,
std::shared_ptr< application::ChainSpec chain_spec 
)

Definition at line 15 of file metrics_watcher.cpp.

Member Function Documentation

outcome::result< uintmax_t > kagome::metrics::MetricsWatcher::measure_storage_size ( )
private

Definition at line 63 of file metrics_watcher.cpp.

bool kagome::metrics::MetricsWatcher::prepare ( )

Definition at line 33 of file metrics_watcher.cpp.

bool kagome::metrics::MetricsWatcher::start ( )

Definition at line 37 of file metrics_watcher.cpp.

void kagome::metrics::MetricsWatcher::stop ( )

Definition at line 56 of file metrics_watcher.cpp.

Member Data Documentation

metrics::Gauge* kagome::metrics::MetricsWatcher::metric_storage_size_
private

Definition at line 40 of file metrics_watcher.hpp.

metrics::RegistryPtr kagome::metrics::MetricsWatcher::metrics_registry_
private

Definition at line 39 of file metrics_watcher.hpp.

volatile bool kagome::metrics::MetricsWatcher::shutdown_requested_ = false
private

Definition at line 35 of file metrics_watcher.hpp.

boost::filesystem::path kagome::metrics::MetricsWatcher::storage_path_
private

Definition at line 33 of file metrics_watcher.hpp.

std::thread kagome::metrics::MetricsWatcher::thread_
private

Definition at line 36 of file metrics_watcher.hpp.


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