summaryrefslogtreecommitdiffstats
path: root/third_party/rust/sha2/benches
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
commit9e3c08db40b8916968b9f30096c7be3f00ce9647 (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /third_party/rust/sha2/benches
parentInitial commit. (diff)
downloadthunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.tar.xz
thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/sha2/benches')
-rw-r--r--third_party/rust/sha2/benches/mod.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/third_party/rust/sha2/benches/mod.rs b/third_party/rust/sha2/benches/mod.rs
new file mode 100644
index 0000000000..8c60cccb9b
--- /dev/null
+++ b/third_party/rust/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;
+);