Skip to content

Commit

Permalink
reimplement the alp bencher
Browse files Browse the repository at this point in the history
  • Loading branch information
azimafroozeh committed Dec 1, 2024
1 parent 2699a3d commit f355549
Show file tree
Hide file tree
Showing 44 changed files with 607 additions and 372 deletions.
12 changes: 7 additions & 5 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
if (NOT DEFINED ENV{ALP_DATASET_DIR_PATH})
message(WARNING "Set ALP_DATASET_DIR_PATH environment variable")
message(WARNING "Set HURRICANE_ISABEL_DATASET_DIR_PATH" environment variable)
else ()

endif ()

add_subdirectory(bench_speed)


add_executable(bench_alp_compression_ratio bench_compression_ratio.cpp)
target_link_libraries(bench_alp_compression_ratio PUBLIC ALP gtest_main)
gtest_discover_tests(bench_alp_compression_ratio)

add_executable(test_compression_ratio test_compression_ratio.cpp)
target_link_libraries(test_compression_ratio PUBLIC ALP gtest_main)
gtest_discover_tests(test_compression_ratio)


add_executable(bench_your_dataset bench_your_dataset.cpp)
target_link_libraries(bench_your_dataset PUBLIC ALP gtest_main)
gtest_discover_tests(bench_your_dataset)


274 changes: 0 additions & 274 deletions benchmarks/bench_compression_ratio.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion benchmarks/bench_speed/bench_alp_cutter_decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static __attribute__((noinline)) benchmark::BenchmarkReporter::Run b_a_e(const d
int64_t* ffor_arr,
int64_t* base_arr,
alp::state<double>& stt,
alp_bench::Column& dataset,
alp_bench::ALPColumnDescriptor& dataset,
uint64_t* ffor_right_arr,
uint16_t* ffor_left_arr,
uint64_t* right_arr,
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bench_speed/bench_alp_cutter_encode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static __attribute__((noinline)) benchmark::BenchmarkReporter::Run b_a_e(const d
int64_t* ffor_arr,
int64_t* base_arr,
alp::state<double>& stt,
alp_bench::Column& dataset,
alp_bench::ALPColumnDescriptor& dataset,
uint64_t* ffor_right_arr,
uint16_t* ffor_left_arr,
uint64_t* right_arr,
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bench_speed/bench_alp_encode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static __attribute__((noinline)) benchmark::BenchmarkReporter::Run b_a_e(const d
int64_t* ffor_arr,
int64_t* base_arr,
alp::state<double>& stt,
alp_bench::Column& dataset) {
alp_bench::ALPColumnDescriptor& dataset) {

int benchmark_number = dataset.id;

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/bench_speed/bench_alp_without_sampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static __attribute__((noinline)) benchmark::BenchmarkReporter::Run bench_alp_enc
int64_t* ffor_arr,
int64_t* base_arr,
alp::state<double>& stt,
alp_bench::Column& dataset) {
alp_bench::ALPColumnDescriptor& dataset) {

int benchmark_number = dataset.id;

Expand Down Expand Up @@ -48,7 +48,7 @@ static __attribute__((noinline)) benchmark::BenchmarkReporter::Run bench_alp_enc
int64_t* encoded_arr,
uint8_t fac,
uint8_t exp,
alp_bench::Column& dataset,
alp_bench::ALPColumnDescriptor& dataset,
uint8_t& bw,
int64_t* base_arr,
int64_t* ffor_arr) {
Expand Down
3 changes: 3 additions & 0 deletions benchmarks/bench_your_dataset.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "benchmark.hpp"

TEST_F(ALPBench, bench_alp_on_your_dataset) { bench_dataset(); }
1 change: 1 addition & 0 deletions benchmarks/include/alp_result.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct VectorMetadata {
uint64_t right_bit_width {0};
uint64_t left_bit_width {0};
std::vector<std::pair<uint16_t, uint64_t>> repetition_vec;
alp::Scheme scheme;
};

inline std::string to_str(double val) {
Expand Down
Loading

0 comments on commit f355549

Please sign in to comment.