fix(analyze): divide per-hour rates by time actually worked

A host asleep mid-run tested nothing, and charging that sleep to an arm reports
it slower for a reason unrelated to the arm. The legend also claimed wall clock
while the number was monotonic. Campaigns written before the split are still
read through the old field name so their run hours do not silently zero.

Claude-Session: https://claude.ai/code/session_01A5KmftdEJ49A9z5mF5ESrX
This commit is contained in:
pj committed 2026-08-14 17:43:12 +05:30
1 parent c63a2e4897
commit eacf3fd11f
4 files changed
+67 -13

No files matched your search

+1 -1
View File
@@ -150,7 +150,7 @@ func summarize(current arm) armSummary {
// steps whose action was never dispatched. Only dispatched actions
// exercised the app, so only they belong in a per-action rate.
summary.TotalActions += item.Actions
summary.TotalRunHours += float64(item.DurationMillis) / float64(time.Hour/time.Millisecond)
summary.TotalRunHours += float64(item.MonotonicMillis) / float64(time.Hour/time.Millisecond)
if item.ClampedToBudget {
summary.EventsHeldAtBudget++
}