Skip to content

Display the configured percentile in the console reports - #490

Open
dajiaohuang wants to merge 2 commits into
bencheeorg:mainfrom
dajiaohuang:fix/489-configured-percentile
Open

dajiaohuang wants to merge 2 commits into
bencheeorg:mainfrom
dajiaohuang:fix/489-configured-percentile

Conversation

@dajiaohuang

Copy link
Copy Markdown

A percentiles configuration without 99 raised a MatchError and lost all results, because the three console formatters matched percentiles: %{99 => value} and hardcoded the 99th % header. The reports now use the highest calculated percentile and label the column with it, so the default stays at 99 and the column follows the configuration, as discussed in #152.

Verified with a manual percentiles: [50, 90] run that previously raised, mix format --check-formatted, mix credo, and mix test (138 doctests, 350 tests, with the single failure being the iex integration test that also fails on an unmodified checkout in this environment).

Fixes #489

The console formatters matched `percentiles: %{99 => value}` and
hardcoded the "99th %" column, so a `percentiles` configuration
without 99 raised a MatchError and lost all results.

Report the highest calculated percentile instead, which keeps 99 as
the default while making the column follow the configuration.
The fourth argument of format_scenario carries the percentile now, so the
branches matching true could never be reached - dialyzer flagged both.
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.

Console formatter crashes when percentiles does not include 99

1 participant