17 #ifndef GZ_TRANSPORT_TOPICSTATISTICS_HH_
18 #define GZ_TRANSPORT_TOPICSTATISTICS_HH_
20 #include <gz/msgs/statistic.pb.h>
26 #include "gz/transport/config.hh"
27 #include "gz/transport/Export.hh"
45 inline namespace GZ_TRANSPORT_VERSION_NAMESPACE {
48 class TopicStatisticsPrivate;
62 public:
void Update(
double _stat);
66 public:
double Avg()
const;
70 public:
double StdDev()
const;
74 public:
double Min()
const;
78 public:
double Max()
const;
82 public: uint64_t Count()
const;
85 private: uint64_t count = 0;
88 private:
double average = 0;
92 private:
double sumSquareMeanDist = 0;
130 uint64_t _stamp, uint64_t _seq);
135 public:
void FillMessage(msgs::Metric &_msg)
const;
139 public: uint64_t DroppedMsgCount()
const;
143 public:
Statistics PublicationStatistics()
const;
147 public:
Statistics ReceptionStatistics()
const;
155 #pragma warning(push)
156 #pragma warning(disable: 4251)