diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-11-18 17:42:38 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-11-18 17:57:40 +0300 |
commit | 0dc8d9e60034615bb2e67687bfd94a4ea3e7296f (patch) | |
tree | 394e39f5503c05d6331c8ccfe15b331ff1099419 | |
parent | f355ebbe8420eca558dd6e98846cf31f09df9890 (diff) | |
download | ydb-0dc8d9e60034615bb2e67687bfd94a4ea3e7296f.tar.gz |
Intermediate changes
commit_hash:2440e04b3b8bd1cf2e05526e854a12d30f34b8e8
-rw-r--r-- | yt/yt/library/oom/oom.h | 2 | ||||
-rw-r--r-- | yt/yt/library/oom/tcmalloc_memory_limit_handler.cpp | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/yt/yt/library/oom/oom.h b/yt/yt/library/oom/oom.h index 33a9206398..1fa01194dc 100644 --- a/yt/yt/library/oom/oom.h +++ b/yt/yt/library/oom/oom.h @@ -26,7 +26,7 @@ struct TTCMallocLimitHandlerOptions // Files structure would have the following form: // HeapDumpDirectory/<ActualName>_FilenameSuffix_Timestamp.ext. - TString FilenameSuffix = ""; + std::optional<TString> FilenameSuffix; TDuration Timeout = TDuration::Minutes(5); }; diff --git a/yt/yt/library/oom/tcmalloc_memory_limit_handler.cpp b/yt/yt/library/oom/tcmalloc_memory_limit_handler.cpp index ca624aaea0..cad154d211 100644 --- a/yt/yt/library/oom/tcmalloc_memory_limit_handler.cpp +++ b/yt/yt/library/oom/tcmalloc_memory_limit_handler.cpp @@ -35,11 +35,15 @@ namespace NYT { //////////////////////////////////////////////////////////////////////////////// +namespace { + TString MakeIncompletePath(const TString& path) { return NYT::Format("%v_incomplete", path); } +} // namespace + //////////////////////////////////////////////////////////////////////////////// void CollectAndDumpMemoryProfile(const TString& memoryProfilePath, tcmalloc::ProfileType profileType) @@ -205,7 +209,7 @@ private: { return NYT::MakeFormatterWrapper([this, ×tamp] (TStringBuilderBase* builder) { if (Options_.FilenameSuffix) { - builder->AppendFormat("%v_", Options_.FilenameSuffix); + builder->AppendFormat("%v_", *Options_.FilenameSuffix); } FormatValue(builder, timestamp, "v"); }); |