From: bmichalo Date: Mon, 1 Aug 2016 18:08:56 +0000 (-0400) Subject: pkt_gen: Remove commas from MoonGen results X-Git-Tag: colorado.1.0~29^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=2681d533d7d6ee3204741289a1eada6fa8598887;p=vswitchperf.git pkt_gen: Remove commas from MoonGen results Results from other traffic generators are reported as pure numbers, i.e. 2477356.0000. These values are consumed and processed by other scripts (e.g. CI or OPNFV results visualization), so we should keep it consistent among various traffic generators. JIRA: VSPERF-342 Change-Id: I305421287eb632707038f2c8bc594fcb255ec939 Signed-off-by: bmichalo --- diff --git a/tools/pkt_gen/moongen/moongen.py b/tools/pkt_gen/moongen/moongen.py index 21dec9cc..efd8e004 100644 --- a/tools/pkt_gen/moongen/moongen.py +++ b/tools/pkt_gen/moongen/moongen.py @@ -317,31 +317,31 @@ class Moongen(ITrafficGenerator): results = OrderedDict() results[ResultsConstants.THROUGHPUT_RX_FPS] = ( - '{:,.6f}'.format(total_throughput_rx_fps)) + '{:.6f}'.format(total_throughput_rx_fps)) results[ResultsConstants.THROUGHPUT_RX_MBPS] = ( - '{:,.3f}'.format(total_throughput_rx_mbps)) + '{:.3f}'.format(total_throughput_rx_mbps)) results[ResultsConstants.THROUGHPUT_RX_PERCENT] = ( - '{:,.3f}'.format(total_throughput_rx_pct)) + '{:.3f}'.format(total_throughput_rx_pct)) results[ResultsConstants.TX_RATE_FPS] = ( - '{:,.6f}'.format(total_throughput_tx_fps)) + '{:.6f}'.format(total_throughput_tx_fps)) results[ResultsConstants.TX_RATE_MBPS] = ( - '{:,.3f}'.format(total_throughput_tx_mbps)) + '{:.3f}'.format(total_throughput_tx_mbps)) results[ResultsConstants.TX_RATE_PERCENT] = ( - '{:,.3f}'.format(total_throughput_tx_pct)) + '{:.3f}'.format(total_throughput_tx_pct)) results[ResultsConstants.MIN_LATENCY_NS] = ( - '{:,.3f}'.format(total_min_latency_ns)) + '{:.3f}'.format(total_min_latency_ns)) results[ResultsConstants.MAX_LATENCY_NS] = ( - '{:,.3f}'.format(total_max_latency_ns)) + '{:.3f}'.format(total_max_latency_ns)) results[ResultsConstants.AVG_LATENCY_NS] = ( - '{:,.3f}'.format(total_avg_latency_ns)) + '{:.3f}'.format(total_avg_latency_ns)) return results @@ -587,31 +587,31 @@ class Moongen(ITrafficGenerator): results = OrderedDict() results[ResultsConstants.THROUGHPUT_RX_FPS] = ( - '{:,.6f}'.format(total_throughput_rx_fps / trials)) + '{:.6f}'.format(total_throughput_rx_fps / trials)) results[ResultsConstants.THROUGHPUT_RX_MBPS] = ( - '{:,.3f}'.format(total_throughput_rx_mbps / trials)) + '{:.3f}'.format(total_throughput_rx_mbps / trials)) results[ResultsConstants.THROUGHPUT_RX_PERCENT] = ( - '{:,.3f}'.format(total_throughput_rx_pct / trials)) + '{:.3f}'.format(total_throughput_rx_pct / trials)) results[ResultsConstants.TX_RATE_FPS] = ( - '{:,.6f}'.format(total_throughput_tx_fps / trials)) + '{:.6f}'.format(total_throughput_tx_fps / trials)) results[ResultsConstants.TX_RATE_MBPS] = ( - '{:,.3f}'.format(total_throughput_tx_mbps / trials)) + '{:.3f}'.format(total_throughput_tx_mbps / trials)) results[ResultsConstants.TX_RATE_PERCENT] = ( - '{:,.3f}'.format(total_throughput_tx_pct / trials)) + '{:.3f}'.format(total_throughput_tx_pct / trials)) results[ResultsConstants.MIN_LATENCY_NS] = ( - '{:,.3f}'.format(total_min_latency_ns / trials)) + '{:.3f}'.format(total_min_latency_ns / trials)) results[ResultsConstants.MAX_LATENCY_NS] = ( - '{:,.3f}'.format(total_max_latency_ns / trials)) + '{:.3f}'.format(total_max_latency_ns / trials)) results[ResultsConstants.AVG_LATENCY_NS] = ( - '{:,.3f}'.format(total_avg_latency_ns / trials)) + '{:.3f}'.format(total_avg_latency_ns / trials)) return results