Merge lp:~joetalbott/qa-dashboard/bootspeed_zero_division into lp:qa-dashboard

Proposed by Joe Talbott
Status: Merged
Approved by: Joe Talbott
Approved revision: 750
Merged at revision: 750
Proposed branch: lp:~joetalbott/qa-dashboard/bootspeed_zero_division
Merge into: lp:qa-dashboard
Diff against target: 17 lines (+5/-3)
1 file modified
bootspeed/dashboard.py (+5/-3)
To merge this branch: bzr merge lp:~joetalbott/qa-dashboard/bootspeed_zero_division
Reviewer Review Type Date Requested Status
Paul Larson Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+227973@code.launchpad.net

Commit message

bootspeed - Fix divide by zero error.

Fixes: lp:1346240 - https://bugs.launchpad.net/qa-dashboard/+bug/1346240

Description of the change

bootspeed - Fix divide by zero error.

Fixes: lp:1346240 - https://bugs.launchpad.net/qa-dashboard/+bug/1346240

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:750
http://s-jenkins.ubuntu-ci:8080/job/dashboard-ci/340/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/dashboard-ci/340/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:750
http://s-jenkins.ubuntu-ci:8080/job/dashboard-ci/341/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/dashboard-ci/341/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:750
http://s-jenkins.ubuntu-ci:8080/job/dashboard-ci/343/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/dashboard-ci/343/rebuild

review: Approve (continuous-integration)
Revision history for this message
Paul Larson (pwlars) wrote :

If you are calculating the 'change' would it be 0 if oldaverage was 0? or would the delta simply be the new average (average-oldaverage)?

review: Needs Information
Revision history for this message
Joe Talbott (joetalbott) wrote :

It's actually percent change and the assumption is that for the first entry there is no change since no previous information is available.

Revision history for this message
Paul Larson (pwlars) wrote :

oh, right that makes sense.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bootspeed/dashboard.py'
2--- bootspeed/dashboard.py 2014-03-18 19:03:15 +0000
3+++ bootspeed/dashboard.py 2014-07-23 18:31:22 +0000
4@@ -128,9 +128,11 @@
5
6 entries[entry]['old_average'] = old_average
7
8- entries[entry]['change'] = (
9- average - old_average
10- ) / old_average * 100
11+ entries[entry]['change'] = 0
12+ if old_average != 0:
13+ entries[entry]['change'] = (
14+ average - old_average
15+ ) / old_average * 100
16
17 return entries
18

Subscribers

People subscribed via source and target branches