Repo-Init
 
Loading...
Searching...
No Matches
BaseServerStats.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <prometheus/registry.h>
4
5#define QUANTILE_DEFAULTS \
6 prometheus::Summary::Quantiles \
7 { \
8 {0.5, 0.1}, {0.9, 0.1}, { 0.99, 0.1 } \
9 }
10
16 private:
17 prometheus::Summary *_processingTime{nullptr};
18 prometheus::Gauge *_maxProcessingTime{nullptr};
19 prometheus::Gauge *_minProcessingTime{nullptr};
20 prometheus::Counter *_succeededCommand{nullptr};
21 prometheus::Counter *_failedCommand{nullptr};
22 prometheus::Counter *_totalCommand{nullptr};
23
24 protected:
25 void initBaseStats(const std::shared_ptr<prometheus::Registry> &reg, const std::string &name);
26
27 void consumeBaseStats(uint64_t succeeded, uint64_t failed, double processingTime);
28};
prometheus::Counter * _succeededCommand
Number of succeeded commands.
prometheus::Gauge * _minProcessingTime
Minimum value of the command processing performance.
void consumeBaseStats(uint64_t succeeded, uint64_t failed, double processingTime)
prometheus::Counter * _failedCommand
Number of failed commands.
prometheus::Gauge * _maxProcessingTime
Maximum value of the command processing performance.
prometheus::Counter * _totalCommand
Number of total received commands.
prometheus::Summary * _processingTime
Value of the command processing performance.
void initBaseStats(const std::shared_ptr< prometheus::Registry > &reg, const std::string &name)