Merge ~fginther/+git/autotest-client-tests:fginther/iperf-python3 into ~canonical-kernel-team/+git/autotest-client-tests:master

Proposed by Francis Ginther
Status: Merged
Approved by: Po-Hsu Lin
Approved revision: 450f3267e00bc6847d463a87d559bcf33a2dc662
Merged at revision: 69894f228cc17abe77293ef737ad63539e190a5a
Proposed branch: ~fginther/+git/autotest-client-tests:fginther/iperf-python3
Merge into: ~canonical-kernel-team/+git/autotest-client-tests:master
Diff against target: 13 lines (+1/-1)
1 file modified
iperf/iperf.py (+1/-1)
Reviewer Review Type Date Requested Status
Po-Hsu Lin Approve
Sean Feole Approve
Cory Todd (community) Approve
Review via email: mp+440601@code.launchpad.net

Commit message

UBUNTU: SAUCE: iperf: ensure interval for mpstat is an int

Going from python2 to python3 resulted in a float being returned when
calculation the mpstat interval. Force this value to int for mpstat.

Signed-off-by: Francis Ginther <email address hidden>

Description of the change

Tested on my local sandbox.

To post a comment you must log in.
Revision history for this message
Cory Todd (corytodd) :
review: Approve
Revision history for this message
Sean Feole (sfeole) :
review: Approve
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/iperf/iperf.py b/iperf/iperf.py
2index 08eca5b..66650d2 100644
3--- a/iperf/iperf.py
4+++ b/iperf/iperf.py
5@@ -125,7 +125,7 @@ class iperf(test.test):
6 # Get 5 mpstat samples. Since tests with large number of streams
7 # take a long time to start up all the streams, we'll toss out the
8 # first and last sample when recording results
9- interval = max(1, test_time / 5)
10+ interval = int(max(1, test_time / 5))
11 cmds.append('mpstat -P ALL %s 5' % interval)
12
13 # Add the iperf command

Subscribers

People subscribed via source and target branches