diff options
author | babenko <babenko@yandex-team.com> | 2024-01-25 19:09:19 +0300 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-01-26 20:49:16 +0300 |
commit | 97a6113075180982290fb695fd24a666d2b7ceac (patch) | |
tree | 969b6c9e2246058d03b0d5c107a7f9c31c9c1046 /library/cpp/ytalloc/api/ytalloc.h | |
parent | 8f02fda318bb8a50e1712350512d4cb82fff229b (diff) | |
download | ydb-97a6113075180982290fb695fd24a666d2b7ceac.tar.gz |
Introduce TEnumIndexedArray as a refurbished version of TEnumIndexedVector
Diffstat (limited to 'library/cpp/ytalloc/api/ytalloc.h')
-rw-r--r-- | library/cpp/ytalloc/api/ytalloc.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/library/cpp/ytalloc/api/ytalloc.h b/library/cpp/ytalloc/api/ytalloc.h index 219814def2..43ba48852d 100644 --- a/library/cpp/ytalloc/api/ytalloc.h +++ b/library/cpp/ytalloc/api/ytalloc.h @@ -3,6 +3,7 @@ #include <stddef.h> #include <library/cpp/yt/misc/enum.h> +#include <library/cpp/yt/misc/enum_indexed_array.h> #include <util/system/types.h> @@ -289,28 +290,28 @@ DEFINE_ENUM(ETotalCounter, ); // Returns statistics for all user allocations. -TEnumIndexedVector<ETotalCounter, ssize_t> GetTotalAllocationCounters(); +TEnumIndexedArray<ETotalCounter, ssize_t> GetTotalAllocationCounters(); // Returns statistics for small allocations; these are included into total statistics. -TEnumIndexedVector<ESmallCounter, ssize_t> GetSmallAllocationCounters(); +TEnumIndexedArray<ESmallCounter, ssize_t> GetSmallAllocationCounters(); // Returns statistics for large allocations; these are included into total statistics. -TEnumIndexedVector<ELargeCounter, ssize_t> GetLargeAllocationCounters(); +TEnumIndexedArray<ELargeCounter, ssize_t> GetLargeAllocationCounters(); // Returns per-arena statistics for small allocations; these are included into total statistics. -std::array<TEnumIndexedVector<ESmallArenaCounter, ssize_t>, SmallRankCount> GetSmallArenaAllocationCounters(); +std::array<TEnumIndexedArray<ESmallArenaCounter, ssize_t>, SmallRankCount> GetSmallArenaAllocationCounters(); // Returns per-arena statistics for large allocations; these are included into total statistics. -std::array<TEnumIndexedVector<ELargeArenaCounter, ssize_t>, LargeRankCount> GetLargeArenaAllocationCounters(); +std::array<TEnumIndexedArray<ELargeArenaCounter, ssize_t>, LargeRankCount> GetLargeArenaAllocationCounters(); // Returns statistics for huge allocations; these are included into total statistics. -TEnumIndexedVector<EHugeCounter, ssize_t> GetHugeAllocationCounters(); +TEnumIndexedArray<EHugeCounter, ssize_t> GetHugeAllocationCounters(); // Returns statistics for all system allocations; these are not included into total statistics. -TEnumIndexedVector<ESystemCounter, ssize_t> GetSystemAllocationCounters(); +TEnumIndexedArray<ESystemCounter, ssize_t> GetSystemAllocationCounters(); // Returns statistics for undumpable allocations. -TEnumIndexedVector<EUndumpableCounter, ssize_t> GetUndumpableAllocationCounters(); +TEnumIndexedArray<EUndumpableCounter, ssize_t> GetUndumpableAllocationCounters(); DEFINE_ENUM(ETimingEventType, (Mmap) @@ -333,7 +334,7 @@ struct TTimingEventCounters // Returns statistics for timing events happened since start. // See SetTimingEventThreshold. -TEnumIndexedVector<ETimingEventType, TTimingEventCounters> GetTimingEventCounters(); +TEnumIndexedArray<ETimingEventType, TTimingEventCounters> GetTimingEventCounters(); //////////////////////////////////////////////////////////////////////////////// @@ -349,7 +350,7 @@ struct TBacktrace struct TProfiledAllocation { TBacktrace Backtrace; - TEnumIndexedVector<EBasicCounter, ssize_t> Counters; + TEnumIndexedArray<EBasicCounter, ssize_t> Counters; }; // Returns statistics for profiled allocations (available when allocation |