Skip to content

HTML report: per-test trace timeline not normalised to first span (sparse, activity bunched right) #6129

@slang25

Description

@slang25

In the HTML report's per-test Trace tab, the timeline axis starts at 0ms even though span `start` values are absolute offsets from the run start, so all bars are pushed to the right and the left of the track is empty.

Example: `ChangeMessageVisibilityAsync_SetToZero_MakesMessageImmediatelyAvailable` — duration ~76ms, but spans run 275ms→353ms. Axis is labelled 0…353ms and bars sit at ~78%.

Cause: `traceHTML(t)` uses `totalDur = Math.max(start+dur)` with no minimum, and `left = (span.start / totalDur) * 100`.

Fix: normalise to the earliest span, as the other timeline renderer already does — `mn = Math.min(...start)`, `tot = max(start+dur) - mn`, `left = ((span.start - mn) / tot) * 100`, and label the axis 0…tot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions