fake.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #include "fake.h"
  2. #include <util/datetime/base.h>
  3. namespace NMonitoring {
  4. class TFakeEncoder: public IMetricEncoder {
  5. public:
  6. void OnStreamBegin() override {
  7. }
  8. void OnStreamEnd() override {
  9. }
  10. void OnCommonTime(TInstant) override {
  11. }
  12. void OnMetricBegin(EMetricType) override {
  13. }
  14. void OnMetricEnd() override {
  15. }
  16. void OnLabelsBegin() override {
  17. }
  18. void OnLabelsEnd() override {
  19. }
  20. void OnLabel(const TStringBuf, const TStringBuf) override {
  21. }
  22. void OnDouble(TInstant, double) override {
  23. }
  24. void OnInt64(TInstant, i64) override {
  25. }
  26. void OnUint64(TInstant, ui64) override {
  27. }
  28. void OnHistogram(TInstant, IHistogramSnapshotPtr) override {
  29. }
  30. void OnSummaryDouble(TInstant, ISummaryDoubleSnapshotPtr) override {
  31. }
  32. void OnLogHistogram(TInstant, TLogHistogramSnapshotPtr) override {
  33. }
  34. void Close() override {
  35. }
  36. };
  37. IMetricEncoderPtr EncoderFake() {
  38. return MakeHolder<TFakeEncoder>();
  39. }
  40. }