Sum-detail traces: correct idle time in Time Profile and Usage Profile - #158
Merged
Conversation
getTotalIdlePercentagePerInterval divided each PE's idle percentage by the interval count (copied from the per-PE variant) instead of the PE count, making sum-detail idle ~0 everywhere; Time Profile then showed the missing time as overhead (all black). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rval Summary traces round each EP's time within an interval, so a fully busy PE can report a few us more than the interval size; the derived overhead then goes slightly negative and the bad-data filter discarded the whole interval (with a log-corruption warning) for a 0.1% rounding overshoot. Clamp negatives within the existing 5% tolerance to zero and keep discarding only intervals that are genuinely out of range. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The sum-detail branch of GetUsageData filled only per-EP times, leaving the idle slot at zero; average the .sum files' per-interval idle percentage over the selected range, as Time Profile already does. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lvkale
requested review from
ericjbohm,
matthiasdiener and
ritvikrao
as code owners
July 29, 2026 00:39
ritvikrao
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three fixes for summary-detail (.sumd) traces, found while examining a 4-PE sum-detail trace whose Time Profile showed all black (overhead) and emitted "found bad data" warnings.
Fixes
SumAnalyzer: Average per-interval idle over PEs, not intervals.
getTotalIdlePercentagePerIntervaldivided each PE's idle percentage by the interval count (copied from the per-PE variant below it) instead of the PE count, making idle ~0 in every interval; Time Profile then showed the missing time as overhead — an all-black chart.Time Profile: Clamp small negative values instead of zeroing the interval. Summary tracing rounds each EP's time within an interval, so a fully busy PE can report a few µs more than the interval size (verified against the raw .sumd data: the flagged intervals were 1001–1003 µs of work in a 1000 µs interval). The derived overhead then goes slightly negative and the bad-data filter discarded the whole interval with a log-corruption warning — for a 0.1% rounding overshoot. Negatives within the existing 5% tolerance are now clamped to zero; only genuinely out-of-range intervals are still discarded.
Usage Profile: Show idle time for sum-detail traces. The sum-detail branch of
Analysis.GetUsageDatafilled only per-EP times and never set the idle slot, so bars showed no idle at all. Since .sumd files carry no idle data, it is now taken from the .sum files' per-interval idle percentage averaged over the selected range — the same source Time Profile uses.Testing
gradle copyJarToBin+./bin/projections --exit test/hello.stsclean.🤖 Generated with Claude Code