From 11c3ca676686b76741e502a11a9409c723376585 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Thu, 18 Jul 2024 14:19:11 -0700 Subject: [PATCH] Add oldest_extant_version metric --- ConflictSet.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 2db0bec..13ee9dd 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -3262,6 +3262,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl { if (n == nullptr) { removalKey = {}; oldestExtantVersion = oldestVersionAtGcBegin; + oldest_extant_version.set(oldestExtantVersion); oldestVersionAtGcBegin = oldestVersionFullPrecision; #if DEBUG_VERBOSE && !defined(NDEBUG) fprintf(stderr, @@ -3310,6 +3311,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl { newestVersionFullPrecision = oldestVersion; oldest_version.set(oldestVersionFullPrecision); newest_version.set(newestVersionFullPrecision); + oldest_extant_version.set(oldestExtantVersion); tls.~WriteContext(); new (&tls) WriteContext(); @@ -3432,6 +3434,9 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl { GAUGE(oldest_version, "The lowest version that doesn't result in \"TooOld\" for checks"); GAUGE(newest_version, "The version of the most recent call to addWrites"); + GAUGE( + oldest_extant_version, + "A lower bound on the lowest version associated with an existing entry"); #if MEASURE_CHECK_CPU_TIME COUNTER(check_cpu_seconds_total, "Total cpu seconds spent in a call to check");