diff --git a/Cargo.lock b/Cargo.lock index 4c87734..6096997 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1494,7 +1494,7 @@ dependencies = [ [[package]] name = "slowkey" -version = "1.5.9" +version = "1.6.0" dependencies = [ "base64 0.21.7", "better-panic", diff --git a/Cargo.toml b/Cargo.toml index 7849a7a..5c85d02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Leonid Beder "] edition = "2021" name = "slowkey" -version = "1.5.9" +version = "1.6.0" [dependencies] base64 = "0.21.7" diff --git a/src/main.rs b/src/main.rs index e909945..c45d252 100755 --- a/src/main.rs +++ b/src/main.rs @@ -837,9 +837,7 @@ fn main() { Some(Commands::Bench {}) => { let output_path = env::current_dir().unwrap().join(BENCHMARKS_DIRECTORY); - let mut criterion = Criterion::default() - .output_directory(&output_path) - .measurement_time(Duration::new(60, 0)); + let mut criterion = Criterion::default().output_directory(&output_path).sample_size(50); SlowKey::benchmark(&mut criterion); diff --git a/src/slowkey.rs b/src/slowkey.rs index 9fe543f..d309bfc 100755 --- a/src/slowkey.rs +++ b/src/slowkey.rs @@ -245,7 +245,7 @@ impl SlowKey { }); }); - for options in [ScryptOptions::new(1 << 15, 8, 1), ScryptOptions::new(1 << 17, 8, 2)] { + for options in [ScryptOptions::new(1 << 10, 8, 1), ScryptOptions::new(1 << 12, 8, 2)] { c.bench_with_input( BenchmarkId::new( "Scrypt", @@ -260,7 +260,7 @@ impl SlowKey { ); } - for options in [Argon2idOptions::new(1 << 15, 2), Argon2idOptions::new(1 << 17, 4)] { + for options in [Argon2idOptions::new(1 << 10, 2), Argon2idOptions::new(1 << 11, 4)] { c.bench_with_input( BenchmarkId::new( "Argon2id", @@ -278,8 +278,8 @@ impl SlowKey { let options = SlowKeyOptions { iterations: 10, length: 32, - scrypt: ScryptOptions::new(1 << 12, 8, 1), - argon2id: Argon2idOptions::new(1 << 12, 2), + scrypt: ScryptOptions::new(1 << 10, 8, 1), + argon2id: Argon2idOptions::new(1 << 10, 2), }; c.bench_with_input(