Add oldest version and newest version metrics
This commit is contained in:
@@ -3156,6 +3156,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
}
|
||||
|
||||
newestVersionFullPrecision = writeVersion;
|
||||
newest_version.set(newestVersionFullPrecision);
|
||||
setOldestVersion(
|
||||
std::max(oldestVersionFullPrecision,
|
||||
newestVersionFullPrecision - kNominalVersionWindow));
|
||||
@@ -3265,6 +3266,7 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
nodes_released_total.add(std::exchange(nodes_released_accum, 0));
|
||||
entries_inserted_total.add(std::exchange(entries_inserted_accum, 0));
|
||||
entries_erased_total.add(std::exchange(entries_erased_accum, 0));
|
||||
oldest_version.set(oldestVersionFullPrecision);
|
||||
}
|
||||
|
||||
int64_t getBytes() const { return totalBytes; }
|
||||
@@ -3273,6 +3275,8 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
this->oldestVersion = InternalVersionT(oldestVersion);
|
||||
oldestVersionFullPrecision = oldestExtantVersion = oldestVersionAtGcBegin =
|
||||
newestVersionFullPrecision = oldestVersion;
|
||||
oldest_version.set(oldestVersionFullPrecision);
|
||||
newest_version.set(newestVersionFullPrecision);
|
||||
|
||||
allocators.~NodeAllocators();
|
||||
new (&allocators) NodeAllocators();
|
||||
@@ -3387,6 +3391,9 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
gc_iterations_total,
|
||||
"The total number of iterations of the main loop for garbage collection");
|
||||
COUNTER(write_bytes_total, "Total number of key bytes in calls to addWrites");
|
||||
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");
|
||||
#if MEASURE_CHECK_CPU_TIME
|
||||
COUNTER(check_cpu_seconds_total,
|
||||
"Total cpu seconds spent in a call to check");
|
||||
|
Reference in New Issue
Block a user