rippled
Loading...
Searching...
No Matches
NullCollector.cpp
1#include <xrpl/beast/insight/Collector.h>
2#include <xrpl/beast/insight/Counter.h>
3#include <xrpl/beast/insight/CounterImpl.h>
4#include <xrpl/beast/insight/Event.h>
5#include <xrpl/beast/insight/EventImpl.h>
6#include <xrpl/beast/insight/Gauge.h>
7#include <xrpl/beast/insight/GaugeImpl.h>
8#include <xrpl/beast/insight/Hook.h>
9#include <xrpl/beast/insight/HookImpl.h>
10#include <xrpl/beast/insight/Meter.h>
11#include <xrpl/beast/insight/MeterImpl.h>
12#include <xrpl/beast/insight/NullCollector.h>
13
14#include <memory>
15#include <string>
16
17namespace beast {
18namespace insight {
19
20namespace detail {
21
22class NullHookImpl : public HookImpl
23{
24public:
25 explicit NullHookImpl() = default;
26
27private:
30};
31
32//------------------------------------------------------------------------------
33
35{
36public:
37 explicit NullCounterImpl() = default;
38
39 void
41 {
42 }
43
44private:
47};
48
49//------------------------------------------------------------------------------
50
52{
53public:
54 explicit NullEventImpl() = default;
55
56 void
57 notify(value_type const&) override
58 {
59 }
60
61private:
64};
65
66//------------------------------------------------------------------------------
67
69{
70public:
71 explicit NullGaugeImpl() = default;
72
73 void
74 set(value_type) override
75 {
76 }
77
78 void
80 {
81 }
82
83private:
86};
87
88//------------------------------------------------------------------------------
89
91{
92public:
93 explicit NullMeterImpl() = default;
94
95 void
97 {
98 }
99
100private:
103};
104
105//------------------------------------------------------------------------------
106
108{
109private:
110public:
111 NullCollectorImp() = default;
112
113 ~NullCollectorImp() = default;
114
115 Hook
120
121 Counter
126
127 Event
128 make_event(std::string const&) override
129 {
131 }
132
133 Gauge
134 make_gauge(std::string const&) override
135 {
137 }
138
139 Meter
140 make_meter(std::string const&) override
141 {
143 }
144};
145
146} // namespace detail
147
148//------------------------------------------------------------------------------
149
155
156} // namespace insight
157} // namespace beast
A metric for measuring an integral value.
Definition Counter.h:20
A metric for reporting event timing.
Definition Event.h:22
A metric for measuring an integral value.
Definition Gauge.h:21
A reference to a handler for performing polled collection.
Definition Hook.h:13
A metric for measuring an integral value.
Definition Meter.h:19
A Collector which does not collect metrics.
static std::shared_ptr< Collector > New()
Event make_event(std::string const &) override
Create an event with the specified name.
Meter make_meter(std::string const &) override
Create a meter with the specified name.
Hook make_hook(HookImpl::HandlerType const &) override
Gauge make_gauge(std::string const &) override
Create a gauge with the specified name.
Counter make_counter(std::string const &) override
Create a counter with the specified name.
NullCounterImpl & operator=(NullCounterImpl const &)
void notify(value_type const &) override
NullEventImpl & operator=(NullEventImpl const &)
void increment(difference_type) override
NullGaugeImpl & operator=(NullGaugeImpl const &)
NullHookImpl & operator=(NullHookImpl const &)
void increment(value_type) override
NullMeterImpl & operator=(NullMeterImpl const &)
T is_same_v