Repo-Init
 
Loading...
Searching...
No Matches
ZeroMQStats.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <prometheus/registry.h>
6#include <zmq.hpp>
7
13 std::chrono::high_resolution_clock::time_point processingTimeStart;
14 std::chrono::high_resolution_clock::time_point processingTimeEnd;
15 bool isSuccessful{false};
16};
17
23 private:
24 prometheus::Family<prometheus::Info> *_infoFamily;
25 prometheus::Counter *_succeededCommandParts;
26 prometheus::Counter *_failedCommandParts;
27 prometheus::Counter *_totalCommandParts;
28 prometheus::Counter *_totalUploadBytes;
29 prometheus::Counter *_totalDownloadBytes;
30
31 public:
37 explicit ZeroMQStats(const std::shared_ptr<prometheus::Registry> &reg, const std::string &prependName = "");
38
45 void consumeStats(const std::vector<zmq::message_t> &recvMsgs, const std::vector<zmq::message_t> &sendMsgs,
46 const ZeroMQServerStats &serverStats);
47};
prometheus::Counter * _failedCommandParts
Number of received failed message parts.
prometheus::Counter * _totalDownloadBytes
Total downloaded bytes.
void consumeStats(const std::vector< zmq::message_t > &recvMsgs, const std::vector< zmq::message_t > &sendMsgs, const ZeroMQServerStats &serverStats)
ZeroMQStats(const std::shared_ptr< prometheus::Registry > &reg, const std::string &prependName="")
prometheus::Counter * _totalCommandParts
Number of received total message parts.
prometheus::Counter * _succeededCommandParts
Number of received succeeded message parts.
prometheus::Counter * _totalUploadBytes
Total uploaded bytes.
prometheus::Family< prometheus::Info > * _infoFamily
Information metric family.
bool isSuccessful
Indicates if processing was successful for this connection.
std::chrono::high_resolution_clock::time_point processingTimeEnd
Processing time end.
std::chrono::high_resolution_clock::time_point processingTimeStart
Processing time start.