diff options
| author | Dan Engelbrecht <[email protected]> | 2023-11-06 14:50:33 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-06 14:50:33 +0100 |
| commit | 0b184fd2a65852028672a7a0013ec794c7e0b071 (patch) | |
| tree | 8f2d6f8296016943c1544716a6110be58729b4c6 /src/zenutil/include | |
| parent | fixed issue where file log sink would get the wrong pattern assigned (#513) (diff) | |
| download | zen-0b184fd2a65852028672a7a0013ec794c7e0b071.tar.xz zen-0b184fd2a65852028672a7a0013ec794c7e0b071.zip | |
statsd for cas (#511)
* separate statsd interfaces so they can be accessible to zenstore
* statsd for cas
Diffstat (limited to 'src/zenutil/include')
| -rw-r--r-- | src/zenutil/include/zenutil/statsreporter.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/zenutil/include/zenutil/statsreporter.h b/src/zenutil/include/zenutil/statsreporter.h new file mode 100644 index 000000000..a25e5d353 --- /dev/null +++ b/src/zenutil/include/zenutil/statsreporter.h @@ -0,0 +1,34 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include <zencore/zencore.h> + +namespace zen { + +class StatsProvider; + +class StatsMetrics +{ +public: + virtual void Increment(std::string_view Metric) = 0; + virtual void Decrement(std::string_view Metric) = 0; + virtual void Count(std::string_view Metric, int64_t CountDelta) = 0; + virtual void Gauge(std::string_view Metric, uint64_t CurrentValue) = 0; + virtual void Meter(std::string_view Metric, uint64_t IncrementValue) = 0; + + // Not (yet) implemented: Set,Timing +protected: + virtual ~StatsMetrics() = default; +}; + +class StatsProvider +{ +public: + virtual void ReportMetrics(StatsMetrics& Statsd) = 0; + +protected: + virtual ~StatsProvider() = default; +}; + +} // namespace zen |