tests: timer: behavior_external: fix MAX_STD_DEV
Fix `MAX_STD_DEV` calculation at the timer behavior external test. Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
This commit is contained in:
parent
d2ff869a1d
commit
889950843f
1 changed files with 3 additions and 3 deletions
|
@ -37,10 +37,10 @@ def do_analysis(test, stats, stats_count, config, sys_clock_hw_cycles_per_sec):
|
|||
max_bound = (test_period + period_max_drift * test_period +
|
||||
expected_period_drift) / 1_000_000
|
||||
|
||||
cyc_us = 1000000 / sys_clock_hw_cycles_per_sec
|
||||
min_cyc = 1. / sys_clock_hw_cycles_per_sec
|
||||
max_stddev = int(config['TIMER_TEST_MAX_STDDEV']) / 1_000_000
|
||||
# Max STDDEV cannot be lower than clock single cycle
|
||||
max_stddev = max(cyc_us, max_stddev)
|
||||
max_stddev = max(min_cyc, max_stddev)
|
||||
|
||||
max_drift_ppm = int(config['TIMER_EXTERNAL_TEST_MAX_DRIFT_PPM'])
|
||||
time_diff = stats['total_time'] - seconds - expected_total_drift
|
||||
|
@ -65,7 +65,7 @@ def do_analysis(test, stats, stats_count, config, sys_clock_hw_cycles_per_sec):
|
|||
f', "min_bound_us":{min_bound * 1_000_000:.6f}'
|
||||
f', "max_bound_us":{max_bound * 1_000_000:.6f}'
|
||||
f', "expected_period_cycles":{expected_period:.0f}'
|
||||
f', "MAX_STD_DEV":{max_stddev:.6f}'
|
||||
f', "MAX_STD_DEV":{max_stddev * 1_000_000:.0f}'
|
||||
f', "sys_clock_hw_cycles_per_sec":{sys_clock_hw_cycles_per_sec}, ' +
|
||||
', '.join(['"CONFIG_{}":{}'.format(k, str(config[k]).rstrip()) for k in [
|
||||
'SYS_CLOCK_HW_CYCLES_PER_SEC',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue