summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2013-08-23 15:56:56 +0100
committerNeil Williams <codehelp@debian.org>2013-08-23 15:56:56 +0100
commitc2b9fe5ab962b4529cd23860b06a3ed4104997fd (patch)
treebc24449ee141337855b23388cc54f4c0794831f0
parentc4709e7085e67dfb7b9d90969ac84270d2a5c54a (diff)
fix typo in found_result and strip trailing spaces
-rwxr-xr-xnetperf-defs/netperf2LAVA.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/netperf-defs/netperf2LAVA.py b/netperf-defs/netperf2LAVA.py
index ce47012..29e5366 100755
--- a/netperf-defs/netperf2LAVA.py
+++ b/netperf-defs/netperf2LAVA.py
@@ -3,10 +3,10 @@ import re
import sys
#Parse netperf results looking for the data in the form of
-#line = "87380 16384 2048 10.00 4289.48 51.12 51.12 3.905 3.905" ./netperf -l 10 -c -C -- -m 2048 -D
-#line = "180224 8192 10.00 1654855 0 10845.1 52.60 1.589" ./netperf -t UDP_STREAM -l 10 -c -C -- -m 8192 -D
-#line = "180224 10.00 1649348 10809.0 52.60 1.589" rcv side of UDP_STREAM
-#line = "16384 87380 1 1 10.00 47469.68 29.84 29.84 25.146 25.146" ./netperf -t TCP_RR -l 10 -c -C -- -r 1,1
+#line = "87380 16384 2048 10.00 4289.48 51.12 51.12 3.905 3.905" ./netperf -l 10 -c -C -- -m 2048 -D
+#line = "180224 8192 10.00 1654855 0 10845.1 52.60 1.589" ./netperf -t UDP_STREAM -l 10 -c -C -- -m 8192 -D
+#line = "180224 10.00 1649348 10809.0 52.60 1.589" rcv side of UDP_STREAM
+#line = "16384 87380 1 1 10.00 47469.68 29.84 29.84 25.146 25.146" ./netperf -t TCP_RR -l 10 -c -C -- -r 1,1
found_result = "false"
parser_tcp = re.compile("^\s*(?P<Recv>\d+)\s+(?P<Send>\d+)\s+(?P<Msg>\d+)\s+(?P<time>\d+\.\d+)\s+(?P<throughput>\d+\.\d+)\s+(?P<cpu_s>\d+\.\d+)\s+(?P<cpu_r>\d+\.\d+)\s+(?P<srv_s>\d+\.\d+)\s+(?P<dem_r>\d+\.\d+)\s*$")
@@ -36,7 +36,7 @@ for line in sys.stdin:
print "test_case_id:UDP_STREAM snd throughput" + "(Msg Sz: " + result.group('Msg') + ")" + " units:10^bits/sec " + "measurement:" + result.group('throughput') + " result:pass"
print "test_case_id:UDP_STREAM snd cpu utilization" + "(Msg Sz: " + result.group('Msg') + ")" + " units:% " + "measurement:" + result.group('cpu_s') + " result:pass"
found_result = "true"
- break
+ break
if parser is parser_udp_r:
print "test_case_id:UDP_STREAM rcv throughput" + " units:10^bits/sec " + "measurement:" + result.group('throughput') + " result:pass"
print "test_case_id:UDP_STREAM rcv cpu utilization" + " units:% " + "measurement:" + result.group('cpu_r') + " result:pass"
@@ -49,7 +49,7 @@ for line in sys.stdin:
found_result = "true"
break
else:
- continue
+ continue
if found_result == "false":
- print "units:none " + "measuremnt:" + "0" + " result:fail"
+ print "units:none " + "measurement:" + "0" + " result:fail"