Add point_writes_total and range_writes_total
All checks were successful
Tests / Clang total: 1533, passed: 1533
Clang |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Debug total: 1531, passed: 1531
Tests / SIMD fallback total: 1533, passed: 1533
Tests / Release [gcc] total: 1533, passed: 1533
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 1144, passed: 1144
Tests / Coverage total: 1151, passed: 1151
Code Coverage #### Project Overview No changes detected, that affect the code coverage. * Line Coverage: 98.81% (1737/1758) * Branch Coverage: 64.08% (1525/2380) * Complexity Density: 0.00 * Lines of Code: 1758 #### Quality Gates Summary Output truncated.
weaselab/conflict-set/pipeline/head This commit looks good

This commit is contained in:
2024-07-18 14:00:57 -07:00
parent c5e9f18c47
commit b45dec2f1f

View File

@@ -3194,6 +3194,8 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
}
double write_byte_accum = 0;
int point_writes_accum = 0;
int range_writes_accum = 0;
for (int i = 0; i < count; ++i) {
const auto &w = writes[i];
write_byte_accum += w.begin.len + w.end.len;
@@ -3201,15 +3203,19 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
auto end = std::span<const uint8_t>(w.end.p, w.end.len);
if (w.end.len > 0) {
keyUpdates += 3;
++range_writes_accum;
addWriteRange(root, begin, end, InternalVersionT(writeVersion), &tls,
this);
} else {
keyUpdates += 2;
++point_writes_accum;
addPointWrite(root, begin, InternalVersionT(writeVersion), &tls, this);
}
}
memory_bytes.set(totalBytes);
point_writes_total.add(point_writes_accum);
range_writes_total.add(range_writes_accum);
nodes_allocated_total.add(std::exchange(tls.nodes_allocated_accum, 0));
nodes_released_total.add(std::exchange(tls.nodes_released_accum, 0));
entries_inserted_total.add(std::exchange(tls.entries_inserted_accum, 0));
@@ -3403,13 +3409,18 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
COUNTER(too_olds_total,
"Total number of checks where the result is \"too old\"");
COUNTER(check_bytes_total, "Total number of key bytes checked");
COUNTER(point_writes_total, "Total number of point writes");
COUNTER(range_writes_total,
"Total number of range writes (includes prefix writes)");
GAUGE(memory_bytes, "Total number of bytes in use");
COUNTER(nodes_allocated_total,
"The total number of physical tree nodes allocated");
COUNTER(nodes_released_total,
"The total number of physical tree nodes released");
COUNTER(insert_iterations_total,
"The total number of iterations of the main loop for insertion");
"The total number of iterations of the main loop for insertion. "
"Includes searches where the entry already existed, and so insertion "
"did not take place");
COUNTER(entries_inserted_total,
"The total number of entries inserted in the tree");
COUNTER(entries_erased_total,