-
-
Notifications
You must be signed in to change notification settings - Fork 7
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: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #396 +/- ##
============================================
+ Coverage 56.14% 56.76% +0.62%
- Complexity 117 119 +2
============================================
Files 28 28
Lines 675 687 +12
============================================
+ Hits 379 390 +11
- Misses 296 297 +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
@localheinz this is purely an UX change. I want your green light here in order to rebase. If you, for some reasons, do not want this improvement, please share the reasons with me and we can find a common ground or even close this PR. Thanks! |
Apologies for the delay, @mvorisek - please rebase! |
06ef858
to
115f795
Compare
#657 must be merged first
replaces #379
fixes #643
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.