summaryrefslogtreecommitdiffstats
path: root/openpgp/benches/encrypt_message.rs
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-02-10 14:49:33 +0100
committerNora Widdecke <nora@sequoia-pgp.org>2021-04-13 12:38:16 +0200
commit0055f6ba67161692d2a5d32b8c00c6b32bf0c0f1 (patch)
tree3cfe5110dd32cc6350c07d2ecb6303cdf8c2e922 /openpgp/benches/encrypt_message.rs
parenta931158a9810d1ab37a48640c38da779eca6113f (diff)
bench: Restructure.
- Move all benchmarks into a single binary. This prevents dead_code warnings for common functions not used in a specific benchmark, and makes adding new benchmarks a little less surprising. - Cargo would autimatically try to compile all .rs files in /benches as benchmarks. Prevent this with `autobenches = false`.
Diffstat (limited to 'openpgp/benches/encrypt_message.rs')
-rw-r--r--openpgp/benches/encrypt_message.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/openpgp/benches/encrypt_message.rs b/openpgp/benches/encrypt_message.rs
index d83601ad..5b0a0020 100644
--- a/openpgp/benches/encrypt_message.rs
+++ b/openpgp/benches/encrypt_message.rs
@@ -1,13 +1,10 @@
-use criterion::{
- criterion_group, criterion_main, BenchmarkId, Criterion, Throughput,
-};
+use criterion::{criterion_group, BenchmarkId, Criterion, Throughput};
use sequoia_openpgp as openpgp;
use openpgp::cert::Cert;
use openpgp::parse::Parse;
-mod common;
-use common::encrypt;
+use crate::common::encrypt;
lazy_static::lazy_static! {
static ref ZEROS_1_MB: Vec<u8> = vec![0; 1 * 1024 * 1024];
@@ -49,4 +46,3 @@ fn bench_encrypt(c: &mut Criterion) {
}
criterion_group!(benches, bench_encrypt);
-criterion_main!(benches);