-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report global maximum duration only once #396
base: main
Are you sure you want to change the base?
Report global maximum duration only once #396
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #396 +/- ##
============================================
+ Coverage 70.48% 70.85% +0.37%
- Complexity 110 112 +2
============================================
Files 26 26
Lines 515 525 +10
============================================
+ Hits 363 372 +9
- Misses 152 153 +1 ☔ View full report in Codecov by Sentry. |
This comment was marked as off-topic.
This comment was marked as off-topic.
My apologies. In this PR I improved the UX of the output. Please see the PR description. It deduplicates the global max. duration value in the output. And as coded newly, the value in the parenthesis now makes more sense in the header, as the header mentions what the value is about. This is also how https://github.com/johnkary/phpunit-speedtrap was/is coded. |
Perhaps it would make more sense to allow configuring the reporter? This way everyone can use the reporter (and thus, the format of the report) of their choice. What do you think? |
ffe4b33
to
c2f4300
Compare
PR is done and rebased on the latest main.
Deduplicated/simpler to read report is better for UX. IMHO no configuration option is needed, it would only complicate the code. |
c2f4300
to
f937e1e
Compare
@localheinz default/native PHPUnit duration formatter always shows minutes - https://github.com/sebastianbergmann/php-timer/blob/6.0.0/src/Duration.php#L81 - I tried to unify the format with this one, but the results were too complex. Then I tried to format times below 1 minute with |
7fe92b0
to
06ef858
Compare
replaces #379
Now the global maximum duration is still reported, but only once - in the report header. It is now also clearer what the number in the parenthesis means, as the header describes it.
It the items list, only the non-global maximum durations are shown. This makes the non-global maximum duration to stand out visually.