Skip to content

Commit 3d74d4d

Browse files
mattschlebuschzulinx86
authored andcommitted
fix: Remove cpu-config benchmark lower threshold
The benchmark is useful in checking that no regressions have been introduced into deserialization code for /cpu-config The benchmark running faster than expected is not a problem, so this change removes the lower threshold that would cause the benchmark test to fail. Signed-off-by: Matthew Schlebusch <[email protected]>
1 parent 759219c commit 3d74d4d

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

tests/integration_tests/performance/test_cpu_template_benchmark.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
import shutil
1010
from pathlib import Path
1111

12-
import pytest
13-
1412
from framework import utils
1513
from framework.defs import FC_WORKSPACE_DIR
1614
from host_tools import proc
@@ -24,16 +22,16 @@
2422

2523
BASELINES = {
2624
"Intel": {
27-
"deserialize": {"target": 0.025, "delta": 0.02}, # milliseconds
28-
"serialize": {"target": 0.015, "delta": 0.02}, # milliseconds
25+
"deserialize": {"max_target": 0.02}, # milliseconds
26+
"serialize": {"max_target": 0.02}, # milliseconds
2927
},
3028
"AMD": {
31-
"deserialize": {"target": 0.0037, "delta": 0.002}, # milliseconds
32-
"serialize": {"target": 0.015, "delta": 0.02}, # milliseconds
29+
"deserialize": {"max_target": 0.02}, # milliseconds
30+
"serialize": {"max_target": 0.02}, # milliseconds
3331
},
3432
"ARM": {
35-
"deserialize": {"target": 0.00037, "delta": 0.0006}, # milliseconds
36-
"serialize": {"target": 0.0015, "delta": 0.006}, # milliseconds
33+
"deserialize": {"max_target": 0.006}, # milliseconds
34+
"serialize": {"max_target": 0.006}, # milliseconds
3735
},
3836
}
3937

@@ -48,17 +46,14 @@ def _check_statistics(directory, mean):
4846
bench = "serialize"
4947

5048
measure = BASELINES[proc_model[0]][bench]
51-
target, delta = measure["target"], measure["delta"]
49+
max_target = measure["max_target"]
5250

5351
# When using multiple data sets where the delta can
5452
# vary substantially, consider making use of the
5553
# 'rel' parameter for more flexibility.
56-
assert mean == pytest.approx(
57-
target,
58-
abs=delta,
59-
), f"Benchmark result {directory} has changed!"
54+
assert mean < max_target, f"Benchmark result {directory} has changed!"
6055

61-
return f"{target - delta} <= result <= {target + delta}"
56+
return f"{max_target} > result"
6257

6358

6459
def test_cpu_template_benchmark(monkeypatch, record_property):

0 commit comments

Comments
 (0)