aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorinnokentii <innokentii@yandex-team.com>2024-02-12 11:35:51 +0300
committerinnokentii <innokentii@yandex-team.com>2024-02-12 11:49:37 +0300
commit762d2bbba8841b15a712e744c9c71763e6bae6d2 (patch)
tree80bed69a410a5123543b84d3d89f5b38ddc69447
parent8e0e1b0a7c216264eeaa18a082602bb4668b8996 (diff)
downloadydb-762d2bbba8841b15a712e744c9c71763e6bae6d2.tar.gz
Replace complex hack in monlib macro
replace complex hack in monlib macro
-rw-r--r--library/cpp/lwtrace/mon/mon_lwtrace.cpp2
-rw-r--r--library/cpp/monlib/service/pages/templates.h10
2 files changed, 2 insertions, 10 deletions
diff --git a/library/cpp/lwtrace/mon/mon_lwtrace.cpp b/library/cpp/lwtrace/mon/mon_lwtrace.cpp
index 6642b07098..09d56560c4 100644
--- a/library/cpp/lwtrace/mon/mon_lwtrace.cpp
+++ b/library/cpp/lwtrace/mon/mon_lwtrace.cpp
@@ -3451,8 +3451,8 @@ public:
HTML(os) {
TABLE() {
TTimeline timeline = MakeTimeline(node);
+ TABLED() {};
TABLEHEAD() TABLER() {
- TABLED();
for (auto& e : timeline) TABLED() {
TPatternNode* subnode = e.first;
os << subnode->Name;
diff --git a/library/cpp/monlib/service/pages/templates.h b/library/cpp/monlib/service/pages/templates.h
index ab1d91c54e..6cdcd6525c 100644
--- a/library/cpp/monlib/service/pages/templates.h
+++ b/library/cpp/monlib/service/pages/templates.h
@@ -3,15 +3,7 @@
#include <util/stream/output.h>
#include <util/system/defaults.h>
-#define WITH_SCOPED(var, value) WITH_SCOPED_I(var, value, Y_GENERATE_UNIQUE_ID(WITH_SCOPED_LABEL_))
-
-#define WITH_SCOPED_I(var, value, label) \
- if (auto var = (value)) { \
- Y_UNUSED(var); \
- goto label; \
- } else \
- label \
- :
+#define WITH_SCOPED(var, value) if (auto var = (value); Y_UNUSED(var), true)
#define TAG(name) WITH_SCOPED(tmp, ::NMonitoring::name(__stream))
#define TAG_CLASS(name, cls) WITH_SCOPED(tmp, ::NMonitoring::name(__stream, cls))