TARAXA
Loading...
Searching...
No Matches
network_metrics.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace taraxa::metrics {
7 public:
8 inline static const std::string group_name = "network";
9 NetworkMetrics(std::shared_ptr<prometheus::Registry> registry) : MetricsGroup(std::move(registry)) {}
10 ADD_GAUGE_METRIC_WITH_UPDATER(setPeersCount, "peers_count", "Count of peers that node is connected to")
11 ADD_GAUGE_METRIC_WITH_UPDATER(setDiscoveredPeersCount, "discovered_peers_count", "Count of discovered peers")
12 ADD_GAUGE_METRIC_WITH_UPDATER(setSyncingDuration, "syncing_duration_sec", "Time node is currently in sync state")
13};
14} // namespace taraxa::metrics
Definition metrics_group.hpp:44
Definition network_metrics.hpp:6
static const std::string group_name
Definition network_metrics.hpp:8
NetworkMetrics(std::shared_ptr< prometheus::Registry > registry)
Definition network_metrics.hpp:9
#define ADD_GAUGE_METRIC_WITH_UPDATER(method, name, description)
combines ADD_UPDATER_METHOD and ADD_GAUGE_METRIC
Definition metrics_group.hpp:40
std::hash for asio::adress
Definition FixedHash.h:483
Definition app_base.hpp:29