| 6 | // NOLINTBEGIN |
| 7 | |
| 8 | static __attribute__((noinline)) benchmark::BenchmarkReporter::Run |
| 9 | bench_decode_zstd(alp_bench::ALPColumnDescriptor& dataset, void* enc_arr, size_t enc_size, void* dec_arr) { |
| 10 | |
| 11 | int benchmark_number = dataset.id; |
| 12 | |
| 13 | #ifdef NDEBUG |
| 14 | uint64_t iterations = 300000 / 128; |
| 15 | #else |
| 16 | uint64_t iterations = 1; |
| 17 | #endif |
| 18 | |
| 19 | std::string benchmark_name = dataset.name + "_decode"; |
| 20 | size_t DECODED_SIZE = 8 * 131072; |
| 21 | |
| 22 | uint64_t cycles = benchmark::cycleclock::Now(); |
| 23 | for (uint64_t j = 0; j < iterations; ++j) { |
| 24 | ZSTD_decompress(dec_arr, DECODED_SIZE, enc_arr, enc_size); |
| 25 | } |
| 26 | |
| 27 | cycles = benchmark::cycleclock::Now() - cycles; |
| 28 | |
| 29 | return benchmark::BenchmarkReporter::Run( |
| 30 | benchmark_number, benchmark_name, iterations, double(cycles) / (double(iterations) * 131072)); |
| 31 | } |
| 32 | |
| 33 | static __attribute__((noinline)) benchmark::BenchmarkReporter::Run |
| 34 | bench_encode_zstd(alp_bench::ALPColumnDescriptor& dataset, double* dbl_arr, void* enc_arr) { |
no test coverage detected