summaryrefslogtreecommitdiffstats
path: root/vendor/sha2/benches
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:47:55 +0000
commit2aadc03ef15cb5ca5cc2af8a7c08e070742f0ac4 (patch)
tree033cc839730fda84ff08db877037977be94e5e3a /vendor/sha2/benches
parentInitial commit. (diff)
downloadcargo-upstream.tar.xz
cargo-upstream.zip
Adding upstream version 0.70.1+ds1.upstream/0.70.1+ds1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/sha2/benches')
-rw-r--r--vendor/sha2/benches/mod.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/sha2/benches/mod.rs b/vendor/sha2/benches/mod.rs
new file mode 100644
index 0000000..8c60ccc
--- /dev/null
+++ b/vendor/sha2/benches/mod.rs
@@ -0,0 +1,22 @@
+#![feature(test)]
+extern crate test;
+
+use digest::bench_update;
+use sha2::{Sha256, Sha512};
+use test::Bencher;
+
+bench_update!(
+ Sha256::default();
+ sha256_10 10;
+ sha256_100 100;
+ sha256_1000 1000;
+ sha256_10000 10000;
+);
+
+bench_update!(
+ Sha512::default();
+ sha512_10 10;
+ sha512_100 100;
+ sha512_1000 1000;
+ sha512_10000 10000;
+);