Skip to content

Commit 08f1c6a

Browse files
authored
Introduce RINEX benchmarking (#301)
* Introduce RINEX benchmarking --------- Signed-off-by: Guillaume W. Bres <[email protected]>
1 parent 990c013 commit 08f1c6a

File tree

7 files changed

+129
-400
lines changed

7 files changed

+129
-400
lines changed

.github/workflows/benchmarks.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Benchmarks
1+
name: Benchmarking
22

33
on:
44
push:
@@ -7,32 +7,37 @@ on:
77
tags:
88
- "*"
99
pull_request:
10-
branches:
11-
- main
12-
13-
env:
14-
RUST_BACKTRACE: 1
15-
CARGO_TERM_COLOR: always
10+
workflow_dispatch:
1611

1712
jobs:
18-
benchmark:
19-
name: Benchmarking
13+
benchmarking:
14+
name: Benchmarking (API)
2015
runs-on: ubuntu-latest
16+
env:
17+
CARGO: cargo
18+
RUST_BACKTRACE: 1
2119
strategy:
22-
fail-fast: true
20+
fail-fast: false
2321
matrix:
2422
include:
25-
- name: BINEX Benchmark
26-
folder: "binex"
23+
- bench: hatanaka
24+
sample_size: 100
25+
- bench: parsing
26+
sample_size: 1000
27+
- bench: formatting
28+
sample_size: 1000
29+
2730
steps:
2831
- name: Checkout sources
2932
uses: actions/checkout@v4
33+
3034
- name: Install stable toolchain
3135
uses: dtolnay/rust-toolchain@master
3236
with:
3337
toolchain: stable
34-
- name: ${{ matrix.name }}
35-
run: cargo bench -p ${{ matrix.folder }} > benchmark.txt
36-
37-
- name: Parse and publish summary
38-
run: python tools/parse_crit_benchmark.py < benchmark.txt >> $GITHUB_STEP_SUMMARY
38+
39+
- name: Bench
40+
run: cargo bench --bench ${{ matrix.bench }} -- --sample-size ${{ matrix.sample_size }} > ${{ matrix.bench }}.txt
41+
42+
- name: Upload Results
43+
run: python tools/parse_crit_benchmark.py < ${{ matrix.bench }}.txt >> $GITHUB_STEP_SUMMARY

rinex/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ rand = "0.8.4"
160160
flate2 = "1"
161161

162162
[[bench]]
163-
name = "observation"
163+
name = "parsing"
164+
harness = false
165+
166+
[[bench]]
167+
name = "formatting"
164168
harness = false
165169

166170
[[bench]]

0 commit comments

Comments
 (0)