Fix median duration for even run counts - #25
Merged
royalpinto007 merged 1 commit intoSep 6, 2026
Conversation
|
Welcome, @Gambit-Checkmate, and thanks for your first pull request to Agentrace. A quick look at CONTRIBUTING.md covers how things are set up and run here. I'll review this shortly. Ask anything in the thread if something is unclear. |
|
Merged. Thanks a lot, @Gambit-Checkmate. Genuinely helpful change for Agentrace. If this project helps you out, a star helps others find it too. Happy to see more from you whenever you have the time. |
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.
agentrace statsselected the upper middle duration for even-sized samples, reporting 20 s for runs lasting 10 s and 20 s. Usestatistics.medianso this reports 15 s instead, retaining the existing whole-second display.Add output-level regression coverage for even and odd counts, a single duration, missing timestamps, and no known durations. The two even-count cases failed with the original implementation before the fix.
Closes #23.
Validation: all 28 tests pass; Ruff lint and formatting checks pass for both modified files;
git diff --checkpasses. Repository-wide Ruff also reports pre-existing diagnostics in untouched files.