Add script to benchmark the tests

This commit is contained in:
link2xt
2023-03-03 15:35:07 +00:00
parent 37383c10ac
commit 60193dd527
2 changed files with 16 additions and 0 deletions

8
scripts/benchmark-tests.sh Executable file
View File

@@ -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 imex::transfer::tests::test_drop_provider --skip imex::transfer::tests::test_send_receive --skip oauth2::tests::test_oauth_from_mx --skip oauth2::tests::test_get_oauth2_token --skip oauth2::tests::test_get_oauth2_addr --skip configure::tests::test_no_panic_on_bad_credentials --skip qr_code_generator::tests::test_generate_backup_qr"