Skip to content

Commit af19d7d

Browse files
add benchmark ci
1 parent 69db09a commit af19d7d

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

.github/workflows/benchmark.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Benchmark and Commit Results
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
jobs:
10+
benchmark:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
persist-credentials: false
18+
19+
- name: Install Rust toolchain
20+
uses: dtolnay/rust-toolchain@stable
21+
with:
22+
toolchain: nightly
23+
- name: probe
24+
run: |
25+
echo $CARGO_HOME
26+
echo $HOME/.cargo
27+
ls $CARGO_HOME/bin
28+
ls $HOME/.cargo/bin
29+
30+
- name: Run benchmark script
31+
run: |
32+
echo "PATH=${HOME}/.cargo/bin:${PATH}" >> $GITHUB_ENV
33+
sudo -E bash scripts/bench.sh > benchmark_results.txt
34+
sudo cat benchmark_results.txt
35+
36+
- uses: stefanzweifel/git-auto-commit-action@v5

readme.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22

33
## run
44

5-
`bash scripts/bench.sh`
5+
`bash scripts/bench.sh`
6+
7+
## result
8+
9+
[result](./benchmark_results.txt)

scripts/bench.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ install_iperf3() {
6565
fi
6666
}
6767

68+
export PATH=$PATH:/home/runner/.cargo/bin
69+
6870
# 1. prepare
6971
print_blue "Installing iperf3..."
7072
install_iperf3

0 commit comments

Comments
 (0)