File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
yt/yt/library/profiling/sensors_owner Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ struct TSensorWrapper
47
47
using TCounterWrapper = TSensorWrapper<TCounter>::template TImpl<&TProfiler::Counter>;
48
48
using TGaugeWrapper = TSensorWrapper<TGauge>::template TImpl<&TProfiler::Gauge>;
49
49
using TTimeGaugeWrapper = TSensorWrapper<TTimeGauge>::template TImpl<&TProfiler::TimeGauge>;
50
+ using TTimerWrapper = TSensorWrapper<TEventTimer>::template TImpl<&TProfiler::Timer>;
50
51
51
52
template <typename ... Args>
52
53
using TTimeHistogramWrapper = typename TSensorWrapper<TEventTimer, Args...>::template TImpl<&TProfiler::TimeHistogram>;
@@ -155,6 +156,11 @@ const TTimeGauge& TSensorsOwner::GetTimeGauge(const std::string& name) const
155
156
return Get<TTimeGaugeWrapper>(name).Sensor ;
156
157
}
157
158
159
+ const TEventTimer& TSensorsOwner::GetTimer (const std::string& name) const
160
+ {
161
+ return Get<TTimerWrapper>(name).Sensor ;
162
+ }
163
+
158
164
const TEventTimer& TSensorsOwner::GetTimeHistogram (const std::string& name, std::vector<TDuration> bounds) const
159
165
{
160
166
return Get<TTimeHistogramWrapper<std::vector<TDuration>>>(name, std::move (bounds)).Sensor ;
Original file line number Diff line number Diff line change @@ -85,6 +85,9 @@ class TSensorsOwner
85
85
// ! Gets owned time gauge with given metric suffix.
86
86
const TTimeGauge& GetTimeGauge (const std::string& name) const ;
87
87
88
+ // ! Gets owned timer with given metric suffix.
89
+ const TEventTimer& GetTimer (const std::string& name) const ;
90
+
88
91
// ! Gets owned TimeHistogram with given metric suffix using bounds as a constructor argument.
89
92
const TEventTimer& GetTimeHistogram (const std::string& name, std::vector<TDuration> bounds) const ;
90
93
You can’t perform that action at this time.
0 commit comments