aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/grpc/server/grpc_counters.cpp
blob: fa96e0100b9ce67dad303911a89bb7c40740b3d6 (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
#include "grpc_counters.h"

namespace NGrpc {
namespace {

class TFakeCounterBlock final: public ICounterBlock {
private:
    void CountNotOkRequest() override {
    }

    void CountNotOkResponse() override {
    }

    void CountNotAuthenticated() override {
    }

    void CountResourceExhausted() override {
    }

    void CountRequestBytes(ui32 /*requestSize*/) override {
    }

    void CountResponseBytes(ui32 /*responseSize*/) override {
    }

    void StartProcessing(ui32 /*requestSize*/) override {
    }

    void FinishProcessing(
            ui32 /*requestSize*/,
            ui32 /*responseSize*/,
            bool /*ok*/,
            ui32 /*status*/,
            TDuration /*requestDuration*/) override
    {
    }
};

} // namespace

ICounterBlockPtr FakeCounterBlock() {
    return MakeIntrusive<TFakeCounterBlock>();
}

} // namespace NGrpc