We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6a73cb commit 49db770Copy full SHA for 49db770
analyzeme/src/analysis.rs
@@ -272,8 +272,11 @@ impl ProfilingData {
272
// Aggregated query cache hit counts
273
QUERY_CACHE_HIT_COUNT_EVENT_KIND => {
274
record_event_data(¤t_event.label, &|data| {
275
- assert_eq!(data.number_of_cache_hits, 0);
276
- data.number_of_cache_hits = value as usize;
+ // rustc produces aggregated cache hits per **query invocation**,
+ // so a query + specific instances of arguments.
277
+ // We need to deduplicate the aggregated counts here to sum them up
278
+ // for individual queries, according to the event label.
279
+ data.number_of_cache_hits += value as usize;
280
});
281
query_cache_hit_counts_found.insert(current_event.label.into_owned());
282
}
0 commit comments