From fd2734475b5f6d3e4fa468d8c3523be47c06330f Mon Sep 17 00:00:00 2001 From: Nick Condron Date: Fri, 11 Oct 2024 17:40:23 -0400 Subject: [PATCH] feat: add dbtext decompression benchmark (#44) --- benches/compress.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/benches/compress.rs b/benches/compress.rs index 8a26e50..a89bc3b 100644 --- a/benches/compress.rs +++ b/benches/compress.rs @@ -82,6 +82,14 @@ fn bench_dbtext(c: &mut Criterion) { b.iter(|| unsafe { compressor.compress_into(&buf, &mut buffer) }); }); + unsafe { + compressor.compress_into(&buf, &mut buffer); + }; + let decompressor = compressor.decompressor(); + group.bench_function("decompress", |b| { + b.iter_with_large_drop(|| decompressor.decompress(&buffer)); + }); + group.finish(); // Report the compression factor for this dataset.