Skip to content

Commit c48be4d

Browse files
committed
Test runtime benchmarks on CI
1 parent 0f01dbc commit c48be4d

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
- name: Build collector
109109
run: cargo build -p collector
110110

111-
- name: Check benchmarks
111+
- name: Check compile benchmarks
112112
run: sh -x -c "ci/check-compile-benchmarks.sh"
113113
env:
114114
JEMALLOC_OVERRIDE: /usr/lib/x86_64-linux-gnu/libjemalloc.so
@@ -195,7 +195,7 @@ jobs:
195195
- name: Build collector
196196
run: cargo build -p collector
197197

198-
- name: Check benchmarks
198+
- name: Check profiling
199199
run: sh -x -c "ci/check-profiling.sh"
200200

201201
database-check:

ci/check-runtime-benchmarks.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@ bash -c "while true; do sleep 30; echo \$(date) - running ...; done" &
66
PING_LOOP_PID=$!
77
trap 'kill $PING_LOOP_PID' ERR 1 2 3 6
88

9-
# Check if the runtime benchmarks can be compiled.
10-
# Once we can actually run the benchmarks on CI, we will also execute them here.
11-
# Currently it is not possible because of `perf` permission issues when gathering perf. counters.
12-
cd collector/runtime-benchmarks
13-
cargo check
9+
# Install a toolchain.
10+
RUST_BACKTRACE=1 RUST_LOG=raw_cargo_messages=trace,collector=debug,rust_sysroot=debug \
11+
bindir=`cargo run -p collector --bin collector install_next`
12+
13+
# Do some benchmarking.
14+
RUST_LOG=raw_cargo_messages=trace,collector=debug,rust_sysroot=debug \
15+
cargo run -p collector --bin collector -- \
16+
bench_runtime_local $bindir/rustc \
17+
--cargo $bindir/cargo \
18+
--iterations 1 \
19+
--id Test
1420

1521
kill $PING_LOOP_PID
1622
exit 0

0 commit comments

Comments
 (0)