Propose a metrics interface
Some checks failed
Tests / Clang total: 1533, failed: 2, passed: 1531
Tests / SIMD fallback total: 1533, failed: 2, passed: 1531
Tests / Release [gcc] total: 1533, failed: 2, passed: 1531
Tests / Release [gcc,aarch64] total: 1144, failed: 2, passed: 1142
Tests / Coverage total: 1151, passed: 1151
weaselab/conflict-set/pipeline/head There was a failure building this commit

This commit is contained in:
2024-07-12 12:00:46 -07:00
parent 1e82f7fe22
commit 3ac16bc966
8 changed files with 197 additions and 3 deletions

View File

@@ -358,7 +358,26 @@ void benchWorstCaseForRadixRangeRead() {
// }
}
void benchMetrics() {
ankerl::nanobench::Bench bench;
ConflictSet cs{0};
bench.run("metrics", [&]() {
ConflictSet::MetricsV1 *m;
int count;
cs.getMetricsV1(&m, &count);
});
}
void benchCreateAndDestroy() {
ankerl::nanobench::Bench bench;
bench.run("create and destroy", [&]() { ConflictSet cs{0}; });
}
int main(void) {
benchConflictSet();
benchWorstCaseForRadixRangeRead();
benchMetrics();
benchCreateAndDestroy();
}