Closed jkeenan closed 1 year ago
Hi Jim,
Thanks for reporting this.
The problem is the sprintf()
at the end of time_in_hhmm()
, it wil round-up for all values that have a fraction-bit >= 5
I will fix it, as it looks nicer to have 19 minutes than 18 minutes 60 seconds, but it's no biggie.
it will be in the next release...
Thanks again, -- Abe.
Under some circumstances, Test::Smoke::Reporter can generate a report file which reports a confusing average smoketime. Consider this report:
https://perl5.test-smoke.org/report/5039564
The 7th line in this web report reads:
Locally, the first 5 lines in the corresponding
.rpt
file (available upon request) are:Two hunches:
I suspect that that should actually read
(average 19 minutes)
.I suspect that one could find this problem at the points where minutes roll over into hours and hours roll over into days -- but I haven't yet investigated these cases.
Here is a program,
time_in_hhmm.pl
, which reproduces the problem. As its name suggests, it is a simple wrapper aroundTest::Smoke::Reporter::time_in_hhmm()
, intended to demonstrate what happens with a variable total elapsed running time and a (here fixed) count of Test::Smoke runs (each consisting of aperlio
and astdio
run through the test suite).Running this program through a 60-second range approximating the elapsed time of the report cited above, I got this output:
What should we do about this?
Thank you very much. Jim Keenan