File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
tests/integration_tests/performance Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 26
26
27
27
optional_grp = group (
28
28
"❓ Optional" ,
29
- "./tools/devtool -y test -c 1-10 -m 0 -- ../tests/integration_tests/ -m no_block_pr" ,
29
+ "./tools/devtool -y test -c 1-10 -m 0 -- ../tests/integration_tests/ -m no_block_pr --log-cli-level=INFO " ,
30
30
** defaults ,
31
31
)
32
32
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ pub fn cpu_template_benchmark(c: &mut Criterion) {
45
45
46
46
criterion_group ! {
47
47
name = cpu_template_benches;
48
- config = Criterion :: default ( ) . sample_size( 200 ) . output_directory ( Path :: new ( "../../build/vmm_benchmark/cpu_templates" ) ) ;
48
+ config = Criterion :: default ( ) . sample_size( 200 ) ;
49
49
targets = cpu_template_benchmark
50
50
}
51
51
Original file line number Diff line number Diff line change 2
2
# SPDX-License-Identifier: Apache-2.0
3
3
"""Optional benchmarks-do-not-regress test"""
4
4
5
+ import json
6
+ import logging
5
7
import os
6
8
import platform
7
9
11
13
from host_tools .cargo_build import cargo
12
14
13
15
TARGET_BRANCH = os .environ .get ("BUILDKITE_PULL_REQUEST_BASE_BRANCH" ) or "main"
16
+ LOGGER = logging .getLogger (__name__ )
14
17
15
18
16
19
@pytest .mark .no_block_pr
@@ -41,6 +44,16 @@ def test_no_regression_relative_to_target_branch():
41
44
if "Performance has regressed." in result
42
45
)
43
46
47
+ for benchmark in os .listdir ("../build/cargo_target/criterion" ):
48
+ with open (
49
+ f"../build/cargo_target/criterion/{ benchmark } /new/estimates.json" ,
50
+ encoding = "utf-8" ,
51
+ ) as file :
52
+ data = json .load (file )
53
+ average_ns = data ["mean" ]["point_estimate" ]
54
+
55
+ LOGGER .info ("%s mean: %iµs" , benchmark , average_ns / 1000 )
56
+
44
57
# If this string is anywhere in stdout, then at least one of our benchmarks
45
58
# is now performing worse with the PR changes.
46
59
assert not regressions_only , "\n " + regressions_only
You can’t perform that action at this time.
0 commit comments