Scorum
node_monitoring_api.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <fc/api.hpp>
4 
5 #ifndef API_NODE_MONITORING
6 #define API_NODE_MONITORING "node_monitoring_api"
7 #endif
8 
9 namespace scorum {
10 namespace app {
11 struct api_context;
12 }
13 } // namespace scorum
14 
15 namespace scorum {
16 namespace blockchain_monitoring {
17 
18 namespace detail {
19 class node_monitoring_api_impl;
20 }
21 
32 {
33 public:
35 
36  void on_api_startup();
37 
41 
45  uint32_t get_last_block_duration_microseconds() const;
46 
47  uint32_t get_free_shared_memory_mb() const;
48  uint32_t get_total_shared_memory_mb() const;
49 
51 
52 private:
53  std::shared_ptr<detail::node_monitoring_api_impl> _my;
54 };
55 } // namespace blockchain_monitoring
56 } // namespace scorum
57 
59  (get_last_block_duration_microseconds)(get_free_shared_memory_mb)(get_total_shared_memory_mb))
node_monitoring_api(const scorum::app::api_context &ctx)
uint32_t get_last_block_duration_microseconds() const
Returns last block processing duration in microseconds.
Definition: asset.cpp:15