Skip to content

Commit

Permalink
Add script to benchmark the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Oct 9, 2023
1 parent 37383c1 commit dc4ac73
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@ and an own build machine.

## Description of scripts

Scripts should be ran from the root of the repository,
for example:
```
$ scripts/clippy.sh
```

- `clippy.sh` runs `cargo clippy` for all Rust code in the project.

- `deny.sh` runs `cargo deny` for all Rust code in the project.

- `benchmark-tests.sh`

- `../.github/workflows` contains jobs run by GitHub Actions.

- `remote_tests_python.sh` rsyncs to a build machine and runs
Expand Down
8 changes: 8 additions & 0 deletions scripts/benchmark-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
# Benchmark the tests with `hyperfine`.

set -e

# `--tests` selects unit tests but not the documentation tests.
# `--skip` arguments skip online tests.
hyperfine --warmup 1 --min-runs 20 "cargo test --tests --release -- --skip test_oauth_from_mx --skip test_get_oauth2_token --skip oauth2::tests::test_get_oauth2_addr --skip configure::tests::test_no_panic_on_bad_credentials"

0 comments on commit dc4ac73

Please sign in to comment.