diff --git a/Cargo.toml b/Cargo.toml index d787bee9..f01f2e15 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,6 +49,7 @@ xdg = "2.2" mio = "0.6" valgrind_request = { version = "1.1", optional = true } textwrap = "0.11" +crc32fast = "1" [features] default = [] diff --git a/src/bin/cipherbench.rs b/src/bin/cipherbench.rs index 790a654f..590c1024 100644 --- a/src/bin/cipherbench.rs +++ b/src/bin/cipherbench.rs @@ -27,6 +27,13 @@ fn main() -> Result<(), Error> { let input = proxmox::sys::linux::random_data(1024*1024)?; + rate_test("crc32", &|| { + let mut crchasher = crc32fast::Hasher::new(); + crchasher.update(&input); + let _checksum = crchasher.finalize(); + input.len() + }); + rate_test("zstd", &|| { zstd::block::compress(&input, 1).unwrap(); input.len()