aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/monlib/encode/fake/fake.cpp
blob: 69d691361ae28c0f10af03636b8b9ef334410f11 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "fake.h"

#include <util/datetime/base.h>

namespace NMonitoring {
    class TFakeEncoder: public IMetricEncoder {
    public:
        void OnStreamBegin() override {
        }
        void OnStreamEnd() override {
        }

        void OnCommonTime(TInstant) override {
        }

        void OnMetricBegin(EMetricType) override {
        }
        void OnMetricEnd() override {
        }

        void OnLabelsBegin() override {
        }
        void OnLabelsEnd() override {
        }
        void OnLabel(const TStringBuf, const TStringBuf) override {
        }

        void OnDouble(TInstant, double) override {
        }
        void OnInt64(TInstant, i64) override {
        }
        void OnUint64(TInstant, ui64) override {
        }

        void OnHistogram(TInstant, IHistogramSnapshotPtr) override {
        }

        void OnSummaryDouble(TInstant, ISummaryDoubleSnapshotPtr) override {
        }

        void OnLogHistogram(TInstant, TLogHistogramSnapshotPtr) override {
        }

        void Close() override {
        }
    };

    IMetricEncoderPtr EncoderFake() {
        return MakeHolder<TFakeEncoder>();
    }
}