diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-10 00:12:57 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-06-10 00:12:57 +0300 |
commit | a864adadcf849b49085a6c20aa414d535e25fcaf (patch) | |
tree | e8a0e042123090607d2c5beb0ef0aa8ca7ec633f /library/cpp/lwtrace/log.h | |
parent | 683b886494d96e8ab3e8b571c91e69eb03cd8606 (diff) | |
download | ydb-a864adadcf849b49085a6c20aa414d535e25fcaf.tar.gz |
intermediate changes
ref:fd45b675f102830e5f7311e0b3c6aaa6ee7d4eaa
Diffstat (limited to 'library/cpp/lwtrace/log.h')
-rw-r--r-- | library/cpp/lwtrace/log.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/library/cpp/lwtrace/log.h b/library/cpp/lwtrace/log.h index ddf85d9916..0e05ec6306 100644 --- a/library/cpp/lwtrace/log.h +++ b/library/cpp/lwtrace/log.h @@ -444,6 +444,12 @@ namespace NLWTrace { } } } + + template <class TReader> + void ExtractItems(TReader& r) { + ReadItems(r); + OldBuffer->Clear(); + } }; size_t Capacity; @@ -547,6 +553,17 @@ namespace NLWTrace { } } + template <class TReader> + void ExtractItems(TReader& r) const { + TGuard<TSpinLock> g(Lock); + for (auto i: StoragesVec) { + i->ExtractItems(r); + } + for (const auto& orphanStorage: OrphanStorages) { + orphanStorage->ExtractItems(r); + } + } + class TAccessor { private: TStorage& Storage; |