Issue #428: Smart Flank - print how accurate test times are#436
Conversation
20470e8 to
cccb773
Compare
Codecov Report
@@ Coverage Diff @@
## master #436 +/- ##
============================================
- Coverage 78.5% 78.28% -0.22%
- Complexity 646 652 +6
============================================
Files 73 73
Lines 1847 1870 +23
Branches 274 277 +3
============================================
+ Hits 1450 1464 +14
- Misses 221 228 +7
- Partials 176 178 +2 |
|
The percentage calc is the wrong denominator. you have 10 expected, 9 actual which is an error of 1. 11% is 1/9. Should be 1/10, 10%. |
| finalTime += newJunitMap[testCase] ?: 0.0 | ||
| } | ||
|
|
||
| val efficiency = 100 - (expectedTime * 100.0 / finalTime) |
There was a problem hiding this comment.
if you do it this way, it would be (finalTime * 100 / expectedTime) - 100
Ex. expected 10 sec, actual 9 sec
(9 * 100.0 / 10) - 100 = -10% -----> You were 10% off and it was to the downside
(11 * 100.0 / 10) - 100 = +10% -----> You were 10% off and it was to the upside
Or a more readable error calc imo would be:
(finalTime - expectedTime) / expectedTime * 100
(9-10)/10 * 100 = -10%
(11-10)/10 * 100 = +10%
|
I would recommend printing the time diff instead of a percent diff as well. That seems more actionable as a user - a percentage is not so great as it'd require some math to figure out how long each took compared to the expected time. |
bootstraponline
left a comment
There was a problem hiding this comment.
Discussed using human readable time reports:
1h 2m 3s
I agree with the other feedback as well.
d0dc318 to
8792a40
Compare
|
The output will look something like this: |
8792a40 to
0367909
Compare
I like this, fine with me! |
Opening this for feedback.
Example output: