This can for instance be useful to ensure that inter-iteration
time is higher than SUT switch max_idle time.
Signed-off-by: Xavier Simonart <simonartxavier@gmail.com>
Change-Id: I3a94b022f4d38e0c97d5cbd343b36a9a3ed5fd9e
'configonly' : False, # If True, the system will upload all the necessary config fiels to the VMs, but not start PROX and the actual testing
'rundir' : '/opt/rapid', # Directory where to find the tools in the machines running PROX
'resultsdir' : '.', # Directory where to store log files
'configonly' : False, # If True, the system will upload all the necessary config fiels to the VMs, but not start PROX and the actual testing
'rundir' : '/opt/rapid', # Directory where to find the tools in the machines running PROX
'resultsdir' : '.', # Directory where to store log files
+ 'sleep_time' : 2, # Sleep time between two loop iteration. Minimum is 2 seconds. Might be useful to let SUT clean caches
'lat_percentile' : 0.99
}
'lat_percentile' : 0.99
}
Class to manage the flowsizetesting
"""
def __init__(self, test_param, lat_percentile, runtime, testname,
Class to manage the flowsizetesting
"""
def __init__(self, test_param, lat_percentile, runtime, testname,
- environment_file, gen_machine, sut_machine, background_machines):
+ environment_file, gen_machine, sut_machine, background_machines, sleep_time):
super().__init__(test_param, runtime, testname, environment_file)
self.gen_machine = gen_machine
self.sut_machine = sut_machine
self.background_machines = background_machines
self.test['lat_percentile'] = lat_percentile
super().__init__(test_param, runtime, testname, environment_file)
self.gen_machine = gen_machine
self.sut_machine = sut_machine
self.background_machines = background_machines
self.test['lat_percentile'] = lat_percentile
+ self.test['sleep_time'] = sleep_time
if self.test['test'] == 'TST009test':
# This test implements some of the testing as defined in
# https://docbox.etsi.org/ISG/NFV/open/Publications_pdf/Specs-Reports/NFV-TST%20009v3.2.1%20-%20GS%20-%20NFVI_Benchmarks.pdf
if self.test['test'] == 'TST009test':
# This test implements some of the testing as defined in
# https://docbox.etsi.org/ISG/NFV/open/Publications_pdf/Specs-Reports/NFV-TST%20009v3.2.1%20-%20GS%20-%20NFVI_Benchmarks.pdf
test_params['lat_percentile'] = 0.99
RapidLog.info('Latency percentile at {:.0f}%'.format(
test_params['lat_percentile']*100))
test_params['lat_percentile'] = 0.99
RapidLog.info('Latency percentile at {:.0f}%'.format(
test_params['lat_percentile']*100))
+ if testconfig.has_option('TestParameters', 'sleep_time'):
+ test_params['sleep_time'] = int(testconfig.get('TestParameters', 'sleep_time'))
+ if test_params['sleep_time'] < 2:
+ test_params['sleep_time'] = 2
+ else:
+ test_params['sleep_time'] = 2
if testconfig.has_option('TestParameters', 'ipv6'):
test_params['ipv6'] = testconfig.getboolean('TestParameters','ipv6')
if testconfig.has_option('TestParameters', 'ipv6'):
test_params['ipv6'] = testconfig.getboolean('TestParameters','ipv6')
def run_iteration(self, requested_duration, flow_number, size, speed):
BUCKET_SIZE_EXP = self.gen_machine.bucket_size_exp
def run_iteration(self, requested_duration, flow_number, size, speed):
BUCKET_SIZE_EXP = self.gen_machine.bucket_size_exp
+ sleep_time = self.test['sleep_time']
LAT_PERCENTILE = self.test['lat_percentile']
iteration_data= {}
time_loop_data= {}
iteration_data['r'] = 0;
LAT_PERCENTILE = self.test['lat_percentile']
iteration_data= {}
time_loop_data= {}
iteration_data['r'] = 0;
while (iteration_data['r'] < self.test['maxr']):
self.gen_machine.start_latency_cores()
time.sleep(sleep_time)
while (iteration_data['r'] < self.test['maxr']):
self.gen_machine.start_latency_cores()
time.sleep(sleep_time)
test_params['TestName'],
test_params['environment_file'],
gen_machine,
test_params['TestName'],
test_params['environment_file'],
gen_machine,
- sut_machine, background_machines)
+ sut_machine, background_machines,
+ test_params['sleep_time'])
elif test_param['test'] in ['corestatstest']:
test = CoreStatsTest(test_param,
test_params['runtime'],
elif test_param['test'] in ['corestatstest']:
test = CoreStatsTest(test_param,
test_params['runtime'],