summaryrefslogtreecommitdiffstats
path: root/tools/pkt_gen/moongen/moongen.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pkt_gen/moongen/moongen.py')
-rw-r--r--tools/pkt_gen/moongen/moongen.py41
1 files changed, 21 insertions, 20 deletions
diff --git a/tools/pkt_gen/moongen/moongen.py b/tools/pkt_gen/moongen/moongen.py
index 7af83f26..efd8e004 100644
--- a/tools/pkt_gen/moongen/moongen.py
+++ b/tools/pkt_gen/moongen/moongen.py
@@ -138,8 +138,9 @@ class Moongen(ITrafficGenerator):
out_file.write("dstIp = \"" + \
str(traffic['l3']['dstip']) + "\",\n")
- out_file.write("vlanId = " + \
- str(traffic['vlan']['id']) + ",\n")
+ if traffic['vlan']['enabled']:
+ out_file.write("vlanId = " + \
+ str(traffic['vlan']['id']) + ",\n")
out_file.write("searchRunTime = " + \
str(duration) + ",\n")
@@ -316,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
@@ -586,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