From 73589ddd60e4cbcd860102871692541989ea38c6 Mon Sep 17 00:00:00 2001 From: mwish Date: Wed, 25 Oct 2023 20:35:17 +0800 Subject: [PATCH] GH-38452: [C++][Benchmark] Adding benchmark for LZ4/Snappy Compression (#38453) ### Rationale for this change This patch add LZ4 (LZ4_RAW in Parquet standard) and Snappy compression/decompression benchmark. ### What changes are included in this PR? Add groups of benchmarks. ### Are these changes tested? no ### Are there any user-facing changes? no * Closes: #38452 Authored-by: mwish Signed-off-by: Antoine Pitrou --- cpp/src/arrow/util/compression_benchmark.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cpp/src/arrow/util/compression_benchmark.cc b/cpp/src/arrow/util/compression_benchmark.cc index 9ed8a00c521c7..cc04eb4634851 100644 --- a/cpp/src/arrow/util/compression_benchmark.cc +++ b/cpp/src/arrow/util/compression_benchmark.cc @@ -253,6 +253,14 @@ BENCHMARK_TEMPLATE(ReferenceStreamingCompression, Compression::LZ4_FRAME); BENCHMARK_TEMPLATE(ReferenceCompression, Compression::LZ4_FRAME); BENCHMARK_TEMPLATE(ReferenceStreamingDecompression, Compression::LZ4_FRAME); BENCHMARK_TEMPLATE(ReferenceDecompression, Compression::LZ4_FRAME); + +BENCHMARK_TEMPLATE(ReferenceCompression, Compression::LZ4); +BENCHMARK_TEMPLATE(ReferenceDecompression, Compression::LZ4); +#endif + +#ifdef ARROW_WITH_SNAPPY +BENCHMARK_TEMPLATE(ReferenceCompression, Compression::SNAPPY); +BENCHMARK_TEMPLATE(ReferenceDecompression, Compression::SNAPPY); #endif #endif