From c39af9117fed8e474c5d762f3e2e36f108b6ad37 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 15 Jul 2024 13:34:13 -0700 Subject: [PATCH] Remove nodes allocated/released metrics --- ConflictSet.cpp | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index a60e1cb..c0977c9 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -587,8 +587,6 @@ struct Counter : private Metric { }; template struct BoundedFreeListAllocator { - Counter *allocated_total = nullptr; - Counter *released_total = nullptr; static_assert(sizeof(T) >= sizeof(void *)); static_assert(std::derived_from); @@ -623,7 +621,6 @@ template struct BoundedFreeListAllocator { } T *allocate(int partialKeyCapacity) { - allocated_total->add(1); T *result = allocate_helper(partialKeyCapacity); if constexpr (!std::is_same_v) { memset(result->children, 0, sizeof(result->children)); @@ -640,7 +637,6 @@ template struct BoundedFreeListAllocator { } void release(T *p) { - released_total->add(1); if (freeListBytes >= kFreeListMaxMemory) { removeNode(p); return safe_free(p, sizeof(T) + p->partialKeyCapacity); @@ -3202,16 +3198,6 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl { allocators.~NodeAllocators(); new (&allocators) NodeAllocators(); - allocators.node0.allocated_total = &node0_allocated_total; - allocators.node3.allocated_total = &node3_allocated_total; - allocators.node16.allocated_total = &node16_allocated_total; - allocators.node48.allocated_total = &node48_allocated_total; - allocators.node256.allocated_total = &node256_allocated_total; - allocators.node0.released_total = &node0_released_total; - allocators.node3.released_total = &node3_released_total; - allocators.node16.released_total = &node16_released_total; - allocators.node48.released_total = &node48_released_total; - allocators.node256.released_total = &node256_released_total; removalKeyArena = Arena{}; removalKey = {}; @@ -3280,26 +3266,6 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl { #define COUNTER(name, help) \ Counter name { this, #name, help } // ==================== METRICS DEFINITIONS ==================== - COUNTER(node0_allocated_total, - "Total number of nodes of type \"Node0\" that have been allocated"); - COUNTER(node3_allocated_total, - "Total number of nodes of type \"Node3\" that have been allocated"); - COUNTER(node16_allocated_total, - "Total number of nodes of type \"Node16\" that have been allocated"); - COUNTER(node48_allocated_total, - "Total number of nodes of type \"Node48\" that have been allocated"); - COUNTER(node256_allocated_total, - "Total number of nodes of type \"Node256\" that have been allocated"); - COUNTER(node0_released_total, - "Total number of nodes of type \"Node0\" that have been released"); - COUNTER(node3_released_total, - "Total number of nodes of type \"Node3\" that have been released"); - COUNTER(node16_released_total, - "Total number of nodes of type \"Node16\" that have been released"); - COUNTER(node48_released_total, - "Total number of nodes of type \"Node48\" that have been released"); - COUNTER(node256_released_total, - "Total number of nodes of type \"Node256\" that have been released"); GAUGE(memory_bytes, "Total number of bytes in use."); COUNTER(read_point_total, "Total number of point reads checked."); COUNTER(read_prefix_total, "Total number of prefix reads checked.");