File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 - uses : actions/checkout@v6
5858 with :
5959 ref : ${{ github.event.pull_request.head.sha }}
60+ - name : Setup benchmark environment
61+ run : sudo bash scripts/setup-benchmark.sh
6062 - uses : ./.github/actions/setup-rust
6163 with :
6264 repo-token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 5454 with :
5555 sccache : s3
5656 - uses : actions/checkout@v6
57+ - name : Setup benchmark environment
58+ run : sudo bash scripts/setup-benchmark.sh
5759 - uses : ./.github/actions/setup-rust
5860 with :
5961 repo-token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -726,6 +726,8 @@ jobs:
726726 with :
727727 sccache : s3
728728 - uses : actions/checkout@v6
729+ - name : Setup benchmark environment
730+ run : sudo bash scripts/setup-benchmark.sh
729731 - uses : ./.github/actions/setup-rust
730732 with :
731733 repo-token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ jobs:
118118
119119 - uses : actions/checkout@v6
120120 if : inputs.mode != 'pr'
121+ - name : Setup benchmark environment
122+ run : sudo bash scripts/setup-benchmark.sh
121123 - uses : ./.github/actions/setup-rust
122124 with :
123125 repo-token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # SPDX-License-Identifier: Apache-2.0
4+ # SPDX-FileCopyrightText: Copyright the Vortex contributors
5+
6+ set -Eeu -o pipefail -x
7+
8+ if [ " $EUID " -ne 0 ]; then
9+ echo " Environment setup script for benchmarks should run as root."
10+ exit 0
11+ fi
12+
13+ # Turn off frequency scaling
14+ for gov in /sys/devices/system/cpu/cpu* /cpufreq/scaling_governor; do
15+ echo performance > " $gov " 2> /dev/null || true
16+ done
17+
18+ # Really discourage swapping to disk
19+ sysctl vm.swappiness=0
20+
21+ # Disable ASLR - https://docs.kernel.org/admin-guide/sysctl/kernel.html#randomize-va-space
22+ sysctl kernel.randomize_va_space=0
23+
24+ # Reduce kernel logging to minimum
25+ dmesg -n 1
26+
27+ # Disable some unused services and features
28+ systemctl stop apparmor ModemManager
29+ systemctl disable apparmor ModemManager
30+
31+ # mask prevents them from being started by other services
32+ systemctl mask ModemManager
33+
34+ # For apparmor specifically, also teardown loaded profiles
35+ aa-teardown
You can’t perform that action at this time.
0 commit comments