From 5fd8804c5199161ae0c8b21f55972f1414098f75 Mon Sep 17 00:00:00 2001 From: bmichalo Date: Tue, 9 Aug 2016 11:52:36 -0400 Subject: pkt_gen: MoonGen should use class object for line rate calc Instead of hard coding line speed numbers for rate calcuation, MoonGen should use its class object initialized at start time. JIRA: VSPERF-368 Change-Id: I68c688f8c244df16d98cfd15efabf491a317256b Signed-off-by: bmichalo --- tools/pkt_gen/moongen/moongen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/pkt_gen/moongen/moongen.py b/tools/pkt_gen/moongen/moongen.py index 1d2fdee5..0638fcee 100644 --- a/tools/pkt_gen/moongen/moongen.py +++ b/tools/pkt_gen/moongen/moongen.py @@ -502,7 +502,7 @@ class Moongen(ITrafficGenerator): if results_match and parameters_match and num_traffic_streams: # Assume for now 10G link speed max_theoretical_fps = ( - num_traffic_streams * (10000000000 / 8) / (frame_size + 20)) + num_traffic_streams * (self._moongen_line_speed / 8) / (frame_size + 20)) moongen_results[ResultsConstants.THROUGHPUT_RX_FPS] = ( float(results_match.group(6)) * 1000000) -- cgit 1.2.3-korg