Propose a metrics interface

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
+19
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();
}