diff options
author | DanielMartinBuckley <daniel.m.buckley@intel.com> | 2018-03-07 18:09:12 +0000 |
---|---|---|
committer | DanielMartinBuckley <daniel.m.buckley@intel.com> | 2018-03-09 14:04:03 +0000 |
commit | f7e477133cfc87134bb860aaaf39d932bbae1907 (patch) | |
tree | 23e19f938b6a35f7225ac1e052f26220172c2178 /yardstick/network_services/traffic_profile/prox_binsearch.py | |
parent | f753fb86cc26e08dca168c0827d28a7b6f022d1f (diff) |
Do NOT hardcode interface speed for PROX tests
JIRA: YARDSTICK-1035
Do not hardcode NIC/interface speed in PROX test. Test assumes
NIC used is 10Gbps. This is incorrect. It could support 1Gbps,
10Gbps, 25Gbps, 40Gbps or something else.
This is used to calculate pps (Packets Per Second)
In Baremetal the NIC speed could be extracted. however when
run on a virtual machine this is not possible.
Solution:
Add in options section of test file.
eg.
Options:
interface_speed_gbps: 10
Where 10 refers to a 10Gbps. In a setup where multiple interfaces
are used. This will refer to the speed of the slowest connection.
Change-Id: I89ab16479a2cdd1d79e52cbcc5a972762c60d057
Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
Diffstat (limited to 'yardstick/network_services/traffic_profile/prox_binsearch.py')
-rw-r--r-- | yardstick/network_services/traffic_profile/prox_binsearch.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/yardstick/network_services/traffic_profile/prox_binsearch.py b/yardstick/network_services/traffic_profile/prox_binsearch.py index 5700f98e5..c3277fb12 100644 --- a/yardstick/network_services/traffic_profile/prox_binsearch.py +++ b/yardstick/network_services/traffic_profile/prox_binsearch.py @@ -20,6 +20,7 @@ import datetime import time from yardstick.network_services.traffic_profile.prox_profile import ProxProfile +from yardstick.network_services import constants LOG = logging.getLogger(__name__) @@ -99,9 +100,13 @@ class ProxBinSearchProfile(ProxProfile): # throughput and packet loss from the most recent successful test successful_pkt_loss = 0.0 + line_speed = traffic_gen.scenario_helper.all_options.get( + "interface_speed_gbps", constants.NIC_GBPS_DEFAULT) * constants.ONE_GIGABIT_IN_BITS for test_value in self.bounds_iterator(LOG): result, port_samples = self._profile_helper.run_test(pkt_size, duration, - test_value, self.tolerated_loss) + test_value, + self.tolerated_loss, + line_speed) self.curr_time = time.time() diff_time = self.curr_time - self.prev_time self.prev_time = self.curr_time |