Move local accum's into ReadContext
This commit is contained in:
@@ -719,6 +719,9 @@ struct ReadContext {
|
|||||||
int64_t prefix_read_iterations_accum = 0;
|
int64_t prefix_read_iterations_accum = 0;
|
||||||
int64_t range_read_iterations_accum = 0;
|
int64_t range_read_iterations_accum = 0;
|
||||||
int64_t range_read_node_scan_accum = 0;
|
int64_t range_read_node_scan_accum = 0;
|
||||||
|
int64_t commits_accum = 0;
|
||||||
|
int64_t conflicts_accum = 0;
|
||||||
|
int64_t too_olds_accum = 0;
|
||||||
ConflictSet::Impl *impl;
|
ConflictSet::Impl *impl;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3114,9 +3117,6 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
void check(const ReadRange *reads, Result *result, int count) {
|
void check(const ReadRange *reads, Result *result, int count) {
|
||||||
ReadContext tls;
|
ReadContext tls;
|
||||||
tls.impl = this;
|
tls.impl = this;
|
||||||
int commits_accum = 0;
|
|
||||||
int conflicts_accum = 0;
|
|
||||||
int too_olds_accum = 0;
|
|
||||||
int64_t check_byte_accum = 0;
|
int64_t check_byte_accum = 0;
|
||||||
for (int i = 0; i < count; ++i) {
|
for (int i = 0; i < count; ++i) {
|
||||||
const auto &r = reads[i];
|
const auto &r = reads[i];
|
||||||
@@ -3134,9 +3134,9 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
InternalVersionT(reads[i].readVersion), &tls))
|
InternalVersionT(reads[i].readVersion), &tls))
|
||||||
? Commit
|
? Commit
|
||||||
: Conflict;
|
: Conflict;
|
||||||
commits_accum += result[i] == Commit;
|
tls.commits_accum += result[i] == Commit;
|
||||||
conflicts_accum += result[i] == Conflict;
|
tls.conflicts_accum += result[i] == Conflict;
|
||||||
too_olds_accum += result[i] == TooOld;
|
tls.too_olds_accum += result[i] == TooOld;
|
||||||
}
|
}
|
||||||
point_read_total.add(tls.point_read_accum);
|
point_read_total.add(tls.point_read_accum);
|
||||||
prefix_read_total.add(tls.prefix_read_accum);
|
prefix_read_total.add(tls.prefix_read_accum);
|
||||||
@@ -3148,9 +3148,9 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
|||||||
point_read_iterations_total.add(tls.point_read_iterations_accum);
|
point_read_iterations_total.add(tls.point_read_iterations_accum);
|
||||||
prefix_read_iterations_total.add(tls.prefix_read_iterations_accum);
|
prefix_read_iterations_total.add(tls.prefix_read_iterations_accum);
|
||||||
range_read_iterations_total.add(tls.range_read_iterations_accum);
|
range_read_iterations_total.add(tls.range_read_iterations_accum);
|
||||||
commits_total.add(commits_accum);
|
commits_total.add(tls.commits_accum);
|
||||||
conflicts_total.add(conflicts_accum);
|
conflicts_total.add(tls.conflicts_accum);
|
||||||
too_olds_total.add(too_olds_accum);
|
too_olds_total.add(tls.too_olds_accum);
|
||||||
check_bytes_total.add(check_byte_accum);
|
check_bytes_total.add(check_byte_accum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user