aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorinnokentii <innokentii@yandex-team.com>2024-02-12 11:35:51 +0300
committerDaniil Cherednik <dcherednik@ydb.tech>2024-02-14 14:26:21 +0000
commite71b3c903725f06699c9d289164fc07dcc3d003e (patch)
treeacf820217e2c0ac2db1daca86486b442b9fdd3db
parent1af982894f21d72287b9dcab7bf1fbd37d05cd06 (diff)
downloadydb-e71b3c903725f06699c9d289164fc07dcc3d003e.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))