diff --git a/scripts/README.md b/scripts/README.md index 4ce3ddc32e..afb7bca33a 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -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 diff --git a/scripts/benchmark-tests.sh b/scripts/benchmark-tests.sh new file mode 100755 index 0000000000..11fe251fa8 --- /dev/null +++ b/scripts/benchmark-tests.sh @@ -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"