Merge lp:~bladernr/checkbox/1229435-network-script-output-improvement into lp:checkbox

Proposed by Jeff Lane 
Status: Merged
Approved by: Daniel Manrique
Approved revision: 3252
Merged at revision: 3252
Proposed branch: lp:~bladernr/checkbox/1229435-network-script-output-improvement
Merge into: lp:checkbox
Diff against target: 34 lines (+10/-1)
1 file modified
providers/plainbox-provider-checkbox/bin/network (+10/-1)
To merge this branch: bzr merge lp:~bladernr/checkbox/1229435-network-script-output-improvement
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+233380@code.launchpad.net

Description of the change

This adds a little more information to the output on failure: adds the throughput info to the warning message that gets logged. Also added an example to help into on running the iperf test.

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

Looks good, and a similar change is already in checkbox-legacy.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'providers/plainbox-provider-checkbox/bin/network'
2--- providers/plainbox-provider-checkbox/bin/network 2014-08-22 12:12:02 +0000
3+++ providers/plainbox-provider-checkbox/bin/network 2014-09-04 15:29:54 +0000
4@@ -78,7 +78,7 @@
5 (self.iface.link_speed, self.iface.max_speed))
6 logging.error("Check your device configuration and try again")
7 return 1
8-
9+
10 cmd = "timeout 180 iperf -c {} -n {}".format(self.target, self.mbytes)
11
12 logging.debug(cmd)
13@@ -138,6 +138,10 @@
14 int(self.iface.max_speed)))
15 if percent < self.fail_threshold:
16 logging.warn("Poor network performance detected")
17+ logging.warn(" Transfer speed: {} {}b/s".format(
18+ throughput, units))
19+ logging.warn(" {:03.2f}% of theoretical max {}Mb/s\n".format(
20+ percent, int(self.iface.max_speed)))
21 return 30
22
23 logging.debug("Passed benchmark")
24@@ -621,6 +625,11 @@
25 --target 192.168.0.1 --username USERID --password PASSW0RD
26 --filesize-2
27
28+For running iperf test:
29+network test -i eth0 -t iperf --target 192.168.0.1
30+NOTE: The iperf test requires an iperf server running on the same network
31+segment that the test machine is running on.
32+
33 Configuration
34 =============
35

Subscribers

People subscribed via source and target branches