Skip to content

Fix parallel run total durations#2802

Closed
nohwnd wants to merge 3 commits into
mainfrom
fix-parallel-run-durations
Closed

Fix parallel run total durations#2802
nohwnd wants to merge 3 commits into
mainfrom
fix-parallel-run-durations

Conversation

@nohwnd

@nohwnd nohwnd commented Jun 29, 2026

Copy link
Copy Markdown
Member

Container durations were summed, which overstates a parallel run since the files overlap in wall-clock time. Measure the actual elapsed time for Run.Duration in parallel instead.

The per-phase totals (user, framework, discovery) are still summed rather than blanked - they are cumulative work measurements, so they stay meaningful across the overlapping workers and add up to the total container work.

Added a parallel duration test.

Fix #2794

Parallel runs summed container durations, which overstates the run because
the files overlap. Use the wall-clock duration (RunEnd - RunStart) for
Run.Duration and leave the per-phase totals blank in parallel mode.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nohwnd and others added 2 commits June 29, 2026 20:22
The per-phase totals are cumulative measurements of user, framework and discovery time, so they stay valid when files overlap - they just add up to the total work done across the overlapping workers. Only the wall-clock run total needs to be measured fresh, because summing the overlapping container durations overstates it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tions

# Conflicts:
#	tst/Pester.RSpec.Parallel.ts.ps1
@nohwnd

nohwnd commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

Superseded by #2807. That one measures the run wall-clock for Run.Duration instead of summing the container durations, and blanks the per-phase run totals (user/framework/discovery) rather than keeping the sums - the summed per-phase values here were the misleading part, since you can't add durations of work that ran in parallel and get an elapsed time. Closing in favour of #2807.

@nohwnd nohwnd closed this Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v6 Parallel] Total durations are wrong

1 participant