mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-15 06:44:23 +00:00
With an active range filter, the percentage denominator was a theoretical capacity estimate: the number of samples a single thread would produce if it ran continuously through the range at the nominal sampling rate. Actual sample volume scales with total CPU occupancy across all threads, so the estimate was off in either direction: on multi-core workloads percentages were inflated several times over and could exceed 100%, while on mostly idle workloads they were deflated. Toggling the range filter also silently changed what the percentages meant, as the whole-trace mode divides by the collected sample count. Count the samples actually present in the range instead, and exclude context switch samples from both denominators, as they cannot be attributed to any displayed symbol. Percentages now mean the same thing with and without a range filter: the share of attributable samples. Time percentages are intentionally unchanged. They are normalized by wall clock time in both modes, where exceeding 100% legitimately means more than one core was busy.