aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/ytalloc/api/ytalloc.h
diff options
context:
space:
mode:
authorbabenko <babenko@yandex-team.com>2024-01-25 19:09:19 +0300
committerbabenko <babenko@yandex-team.com>2024-01-25 20:01:47 +0300
commit3fa3bc3d67f3e77fce7b45a7fc7608ef9a3131bb (patch)
tree8c5059e4aabe5be183a5a0b9fc851d12a086e568 /library/cpp/ytalloc/api/ytalloc.h
parent4d0fd29627f04e0419f75981e41efb2015daf093 (diff)
downloadydb-3fa3bc3d67f3e77fce7b45a7fc7608ef9a3131bb.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.h21
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