diff options
author | Sridhar K. N. Rao <sridhar.rao@spirent.com> | 2018-11-12 20:16:46 +0530 |
---|---|---|
committer | Sridhar K. N. Rao <sridhar.rao@spirent.com> | 2019-01-21 09:30:24 +0530 |
commit | 650adfeca2cdc49646d9536d965dd855de48c1ad (patch) | |
tree | 306328176532b0a72a3dad18ea82d34d16b3ebeb /tools/pkt_gen/testcenter/testcenter.py | |
parent | 3b1253f1ef1f6719a120bb449a1d9174c0d8319d (diff) |
pkt_gen: STC - Imix Genome Support
This patch adds Imix-Genome support to STC.
1. Imix, of type genome, is included in traffic configuration.
2. The genome is converted to appropriated weights and pkt-sizes.
3. Throughput test is run with imix-configuration.
4. genome configuration is added to results.
5. Added Reporting of Average-Frame-Size - if IMIX is configured.
6. Updated genome comments
7. Clarified the reference to RFC 6985.
JIRA: VSPERF-521
Change-Id: I813efb66338ee1d1320a01ce5e0834180461120c
Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com>
Diffstat (limited to 'tools/pkt_gen/testcenter/testcenter.py')
-rw-r--r-- | tools/pkt_gen/testcenter/testcenter.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/pkt_gen/testcenter/testcenter.py b/tools/pkt_gen/testcenter/testcenter.py index 7afa3d8d..af30cd73 100644 --- a/tools/pkt_gen/testcenter/testcenter.py +++ b/tools/pkt_gen/testcenter/testcenter.py @@ -332,7 +332,7 @@ class TestCenter(trafficgen.ITrafficGenerator): return self.get_rfc2889_addr_learning_results(filec) - def get_rfc2544_results(self, filename): + def get_rfc2544_results(self, filename, genome=None): """ Reads the CSV file and return the results """ @@ -367,6 +367,10 @@ class TestCenter(trafficgen.ITrafficGenerator): row["AverageLatency(us)"]) * 1000 result[ResultsConstants.FRAME_LOSS_PERCENT] = float( row["PercentLoss"]) + if genome: + result[ResultsConstants.IMIX_GENOME] = genome + result[ResultsConstants.IMIX_AVG_FRAMESIZE] = float( + row["AvgFrameSize"]) return result def send_cont_traffic(self, traffic=None, duration=30): @@ -426,6 +430,13 @@ class TestCenter(trafficgen.ITrafficGenerator): if traffic['latency_histogram']['type'] == 'Default': args.append("--latency_histogram") + genome = '' + if traffic and 'imix' in traffic: + if traffic['imix']['enabled']: + if traffic['imix']['type'] == 'genome': + genome = traffic['imix']['genome'] + args.append('--imix' + ' ' + genome) + if settings.getValue("TRAFFICGEN_STC_VERBOSE") == "True": args.append("--verbose") verbose = True @@ -440,7 +451,7 @@ class TestCenter(trafficgen.ITrafficGenerator): if verbose: self._logger.info("file: %s", filec) - return self.get_rfc2544_results(filec) + return self.get_rfc2544_results(filec, genome) def send_rfc2544_back2back(self, traffic=None, tests=1, duration=20, lossrate=0.0): |