TARAXA
Loading...
Searching...
No Matches
pbft_metrics.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace taraxa::metrics {
6class PbftMetrics : public MetricsGroup {
7 public:
8 inline static const std::string group_name = "pbft";
9 PbftMetrics(std::shared_ptr<prometheus::Registry> registry) : MetricsGroup(std::move(registry)) {}
10
11 ADD_GAUGE_METRIC_WITH_UPDATER(setPeriod, "period", "Current PBFT period")
12 ADD_GAUGE_METRIC_WITH_UPDATER(setRound, "round", "Current PBFT round")
13 ADD_GAUGE_METRIC_WITH_UPDATER(setStep, "step", "Current PBFT step")
14 ADD_GAUGE_METRIC_WITH_UPDATER(setVotesCount, "votes_count", "Current node votes count")
15
16 ADD_GAUGE_METRIC(setBlockNumber, "block_number", "Number of the most recent block")
17 ADD_GAUGE_METRIC(setBlockTransactionsCount, "block_transactions_count", "Number of transactions in block")
18 ADD_GAUGE_METRIC(setBlockTimestamp, "block_timestamp", "Number of transactions in block")
19};
20
21} // namespace taraxa::metrics
Definition metrics_group.hpp:44
Definition pbft_metrics.hpp:6
static const std::string group_name
Definition pbft_metrics.hpp:8
PbftMetrics(std::shared_ptr< prometheus::Registry > registry)
Definition pbft_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
#define ADD_GAUGE_METRIC(method, name, description)
add method that is setting specific gauge metric.
Definition metrics_group.hpp:12
std::hash for asio::adress
Definition FixedHash.h:483
Definition app_base.hpp:29