Report global maximum duration only once#396
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #396 +/- ##
============================================
+ Coverage 64.32% 66.76% +2.44%
- Complexity 136 146 +10
============================================
Files 33 33
Lines 625 680 +55
============================================
+ Hits 402 454 +52
- Misses 223 226 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
115f795 to
4d084a8
Compare
4d084a8 to
8e74a3d
Compare
6f7731b to
fa72818
Compare
Co-authored-by: Andreas Möller <am@localheinz.com> Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
fa72818 to
322a751
Compare
|
Thank you, @mvorisek! |
|
Thank you @localheinz, very nice addition! |
replaces #379
fixes #643
With this feature 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.