aboutsummaryrefslogtreecommitdiffstats
path: root/yt
diff options
context:
space:
mode:
authorbabenko <babenko@yandex-team.com>2023-08-02 14:03:57 +0300
committerbabenko <babenko@yandex-team.com>2023-08-02 14:03:57 +0300
commita031f199d96cf42f1ffc6b3b7a65d161cb31c99d (patch)
treea42b6c984c4bb62eb0a1edc0b2673840900518b5 /yt
parent14ca69b73f55d87e2b8d06913c36ea42fba3016f (diff)
downloadydb-a031f199d96cf42f1ffc6b3b7a65d161cb31c99d.tar.gz
Reuse PP_CONACT from library/cpp/yt/misc
Diffstat (limited to 'yt')
-rw-r--r--yt/yt/library/profiling/sensor.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/yt/yt/library/profiling/sensor.h b/yt/yt/library/profiling/sensor.h
index e20031d710..d832e25ff1 100644
--- a/yt/yt/library/profiling/sensor.h
+++ b/yt/yt/library/profiling/sensor.h
@@ -4,6 +4,8 @@
#include "tag.h"
#include "histogram_snapshot.h"
+#include <library/cpp/yt/misc/preprocessor.h>
+
#include <library/cpp/yt/memory/intrusive_ptr.h>
#include <library/cpp/yt/memory/weak_ptr.h>
@@ -393,14 +395,11 @@ using TRegistry = TProfiler;
////////////////////////////////////////////////////////////////////////////////
-#define YT_PROFILE_GENNAME0(line) PROFILE_TIMING__ ## line
-#define YT_PROFILE_GENNAME(line) YT_PROFILE_GENNAME0(line)
-
//! Measures execution time of the statement that immediately follows this macro.
#define YT_PROFILE_TIMING(name) \
- static auto YT_PROFILE_GENNAME(__LINE__) = ::NYT::NProfiling::TProfiler{name}.WithHot().Timer(""); \
- if (auto PROFILE_TIMING__Guard = ::NYT::NProfiling::TEventTimerGuard(YT_PROFILE_GENNAME(__LINE__)); false) \
- { YT_ABORT(); } \
+ static auto PP_CONCAT(TimingProfiler__, __LINE__) = ::NYT::NProfiling::TProfiler(name).WithHot().Timer(""); \
+ if (auto PP_CONCAT(timingProfilerGuard__, __LINE__) = ::NYT::NProfiling::TEventTimerGuard(PP_CONCAT(TimingProfiler__, __LINE__)); false) \
+ { Y_UNREACHABLE(); } \
else
////////////////////////////////////////////////////////////////////////////////