Merge lp:~mfisch/demometrics/minval into lp:demometrics

Proposed by Matt Fischer
Status: Merged
Merged at revision: 8
Proposed branch: lp:~mfisch/demometrics/minval
Merge into: lp:demometrics
Diff against target: 12 lines (+2/-1)
1 file modified
main.cpp (+2/-1)
To merge this branch: bzr merge lp:~mfisch/demometrics/minval
Reviewer Review Type Date Requested Status
Scott Sweeny (community) Approve
Review via email: mp+187872@code.launchpad.net

Description of the change

Set a minimum random value.

To post a comment you must log in.
Revision history for this message
Matt Fischer (mfisch) wrote :

Tested on N4 by setting the max value to 1 and also to 100. When 1 the value comes back as 2, when 100 it works as normal.

Revision history for this message
Scott Sweeny (ssweeny) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'main.cpp'
2--- main.cpp 2013-09-19 20:10:50 +0000
3+++ main.cpp 2013-09-26 18:32:32 +0000
4@@ -20,7 +20,8 @@
5 MetricUpdatePtr update(metric->update());
6
7 for (int i = 0; i < 31; ++i) {
8- update->addData(qrand()%max);
9+ // minimum 2 so it's always plural
10+ update->addData(qrand()%max+2);
11 }
12 }
13

Subscribers

People subscribed via source and target branches