pombreda / pybootchartgui

Automatically exported from code.google.com/p/pybootchartgui
GNU General Public License v3.0
0 stars 0 forks source link

Incorrect seconds value in minutes:seconds for 60+ second boots #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run pybootchartgui on a bootchart data set for a boot that took 60
seconds or more, i.e. where a regular fsck run occured.

What is the expected output? What do you see instead?
Expected: time: 05:19.10
Current: time: 05:319.10

What version of the product are you using? On what operating system?
--version says 0.0.0, dpkg says 0+r102-2

Please provide any additional information below.
It's probably a matter of a date format string or the lack of subtracting
60*minutes seconds from the total number of seconds somewhere before using
it to draw/print the minutes:seconds text.

Original issue reported on code.google.com by sune.kel...@gmail.com on 20 Mar 2009 at 11:21

GoogleCodeExporter commented 9 years ago
Seems to be a missing "60 * " between "dur - " and "math.floor(dur/60)".
In r102 it's at
http://code.google.com/p/pybootchartgui/source/browse/trunk/pybootchartgui/draw.
py?spec=svn98&r=98#272
In r108 (latest) it's at
http://code.google.com/p/pybootchartgui/source/browse/trunk/pybootchartgui/draw.
py?spec=svn108&r=108#277

Patch attached.

Original comment by sune.kel...@gmail.com on 20 Mar 2009 at 11:51

Attachments:

GoogleCodeExporter commented 9 years ago
Also seems like I should have expected "time: 05:24.10" instead of "time: 
05:19.10"
since what actually happened was that the number of minutes 
("math.floor(dur/60)")
was subtracted from the number of seconds, resulting in 324.10 - 5 = 319.10 
seconds.

Original comment by sune.kel...@gmail.com on 21 Mar 2009 at 12:17

GoogleCodeExporter commented 9 years ago
Committed. Thanks a lot.

Original comment by anders.n...@gmail.com on 22 Mar 2009 at 4:04