From ef58752c7f51af2aea1b49df35e4d71f56db95ef Mon Sep 17 00:00:00 2001 From: robot-piglet Date: Fri, 13 Jun 2025 16:15:05 +0300 Subject: Intermediate changes commit_hash:0823737499e7311774bfa8ecf5008efc20309e7d --- yt/yt/library/profiling/sensors_owner/sensors_owner.cpp | 15 +++++++++++++++ yt/yt/library/profiling/sensors_owner/sensors_owner.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/yt/yt/library/profiling/sensors_owner/sensors_owner.cpp b/yt/yt/library/profiling/sensors_owner/sensors_owner.cpp index 168aa94d988..0aa6428d628 100644 --- a/yt/yt/library/profiling/sensors_owner/sensors_owner.cpp +++ b/yt/yt/library/profiling/sensors_owner/sensors_owner.cpp @@ -199,6 +199,21 @@ TIntrusivePtr TSensorsOwner::GetDefaultState() return state; } +const TSensorsOwner& TSensorsOwner::WithHot(bool value) const +{ + struct TChild + { + using TKey = bool; + + TSensorsOwner SensorsOwner; + + TChild(const TProfiler& profiler, bool value) + : SensorsOwner(profiler.WithHot(value)) + { } + }; + return Get(value).SensorsOwner; +} + const TSensorsOwner& GetRootSensorsOwner() { struct TLocalType diff --git a/yt/yt/library/profiling/sensors_owner/sensors_owner.h b/yt/yt/library/profiling/sensors_owner/sensors_owner.h index 420fd007752..d343b45501e 100644 --- a/yt/yt/library/profiling/sensors_owner/sensors_owner.h +++ b/yt/yt/library/profiling/sensors_owner/sensors_owner.h @@ -64,6 +64,8 @@ public: const TSensorsOwner& WithGlobal() const; + const TSensorsOwner& WithHot(bool value = true) const; + const TProfiler& GetProfiler() const; /*! -- cgit v1.3