Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions benchmark/bench_compression_ratio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ BenchmarkCase tpch_case {Tpch::dataset,
std::string(FLS_CMAKE_SOURCE_DIR) +
"/benchmark/result/compression_ratio/tpch/fastlanes_detailed.csv"};

BenchmarkCase time_series_case {
TimeSeries::dataset,
std::string(FLS_CMAKE_SOURCE_DIR) + "/benchmark/result/compression_ratio/time_series/fastlanes.csv",
std::string(FLS_CMAKE_SOURCE_DIR) + "/benchmark/result/compression_ratio/time_series/fastlanes_detailed.csv"};

void run_compression_ratio_benchmark(const BenchmarkCase& benchmark_case) {
const auto& result_file_path = benchmark_case.result_file_path;
const auto detailed_result_file_path = benchmark_case.detailed_result_file_path;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
table_name,version,csv_size,fls_size,compression_ratio
AMPds,0.1.4,2540627,363719,6.99
Computer_Monitor,0.1.4,917528,57529,15.95
Linear_Road,0.1.4,1290067,253407,5.09
Smart_Gird,0.1.4,918847,250929,3.66
Weather_Forcast,0.1.4,2595630,237159,10.94
6 changes: 6 additions & 0 deletions benchmark/result/compression_ratio/time_series/fastlanes.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
table_name,version,file_size
AMPds,0.1.4,363719
Computer_Monitor,0.1.4,57529
Linear_Road,0.1.4,253407
Smart_Gird,0.1.4,250929
Weather_Forcast,0.1.4,237159
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
compression,version,table_name,id,name,data_type,size(bytes),expression,bytes_per_value,bits_per_value
FastLanes,0.1.4,AMPds,0,Column_1,DOUBLE,51665,"{[EXP_DICT_DBL_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.79,6.31
FastLanes,0.1.4,AMPds,1,Column_2,DOUBLE,28726,"{[EXP_DICT_DBL_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.44,3.51
FastLanes,0.1.4,AMPds,2,Column_3,DOUBLE,16744,"{[EXP_DICT_DBL_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.26,2.04
FastLanes,0.1.4,AMPds,3,Column_4,DOUBLE,42400,"{[EXP_DICT_DBL_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.65,5.18
FastLanes,0.1.4,AMPds,4,Column_5,DOUBLE,42542,"{[EXP_DICT_DBL_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.65,5.19
FastLanes,0.1.4,AMPds,5,Column_6,INT16,52348,"{[EXP_DICT_I16_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.80,6.39
FastLanes,0.1.4,AMPds,6,Column_7,INT8,17976,"{[EXP_FFOR_SLPATCH_I08][0, 1, 2, 3, 4, 5]}",0.27,2.19
FastLanes,0.1.4,AMPds,7,Column_8,INT16,31412,"{[EXP_FFOR_SLPATCH_I16][0, 1, 2, 3, 4, 5]}",0.48,3.83
FastLanes,0.1.4,AMPds,8,Column_9,INT8,8906,"{[EXP_DICT_I08_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.14,1.09
FastLanes,0.1.4,AMPds,9,Column_10,INT16,52976,"{[EXP_DICT_I16_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.81,6.47
FastLanes,0.1.4,AMPds,10,Column_11,INT8,17976,"{[EXP_FFOR_SLPATCH_I08][0, 1, 2, 3, 4, 5]}",0.27,2.19
FastLanes,0.1.4,Computer_Monitor,0,Column_1,INT8,9476,"{[EXP_DICT_I08_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.14,1.16
FastLanes,0.1.4,Computer_Monitor,1,Column_2,DOUBLE,23493,"{[EXP_DICT_DBL_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.36,2.87
FastLanes,0.1.4,Computer_Monitor,2,Column_3,INT8,15046,"{[EXP_DICT_I08_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.23,1.84
FastLanes,0.1.4,Computer_Monitor,3,Column_4,INT8,9466,"{[EXP_DICT_I08_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.14,1.16
FastLanes,0.1.4,Linear_Road,0,Column_1,INT16,3748,"{[EXP_CROSS_RLE_I16][0, 1]}",0.06,0.46
FastLanes,0.1.4,Linear_Road,1,Column_2,INT8,57728,"{[EXP_FFOR_I08][0, 1, 2]}",0.88,7.05
FastLanes,0.1.4,Linear_Road,2,Column_3,INT8,1467,"{[EXP_FREQUENCY_I08][0, 1, 2, 3]}",0.02,0.18
FastLanes,0.1.4,Linear_Road,3,Column_4,INT8,21614,"{[EXP_FFOR_SLPATCH_I08][0, 1, 2, 3, 4, 5]}",0.33,2.64
FastLanes,0.1.4,Linear_Road,4,Column_5,INT8,11104,"{[EXP_DICT_I08_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.17,1.36
FastLanes,0.1.4,Linear_Road,5,Column_6,INT32,157698,"{[EXP_FFOR_SLPATCH_I32][0, 1, 2, 3, 4, 5]}",2.41,19.25
FastLanes,0.1.4,Smart_Gird,0,Column_1,DOUBLE,174196,"{[EXP_DICT_DBL_FFOR_U16][0, 1, 2, 3]}",2.66,21.26
FastLanes,0.1.4,Smart_Gird,1,Column_2,INT8,8579,"{[EXP_DICT_I08_FFOR_U08][0, 1, 2, 3]}",0.13,1.05
FastLanes,0.1.4,Smart_Gird,2,Column_3,INT8,33167,"{[EXP_DICT_I08_FFOR_U08][0, 1, 2, 3]}",0.51,4.05
FastLanes,0.1.4,Smart_Gird,3,Column_4,INT8,27100,"{[EXP_RLE_I08_U16][0, 1, 2, 3, 4]}",0.41,3.31
FastLanes,0.1.4,Smart_Gird,4,Column_5,INT8,7839,"{[EXP_CROSS_RLE_I08][0, 1]}",0.12,0.96
FastLanes,0.1.4,Weather_Forcast,0,Column_1,INT8,22,"{[EXP_CROSS_RLE_I08][0, 1]}",0.00,0.00
FastLanes,0.1.4,Weather_Forcast,1,Column_2,INT64,95312,"{[EXP_RLE_I64_U16][0, 1, 2, 3, 4]}",1.45,11.63
FastLanes,0.1.4,Weather_Forcast,2,Column_3,INT8,6788,"{[EXP_DICT_I08_FFOR_U08][0, 1, 2, 3]}",0.10,0.83
FastLanes,0.1.4,Weather_Forcast,3,Column_4,INT8,31633,"{[EXP_DICT_I08_FFOR_U08][0, 1, 2, 3]}",0.48,3.86
FastLanes,0.1.4,Weather_Forcast,4,Column_5,INT8,38912,"{[EXP_FFOR_I08][0, 1, 2]}",0.59,4.75
FastLanes,0.1.4,Weather_Forcast,5,Column_6,INT8,37888,"{[EXP_FFOR_I08][0, 1, 2]}",0.58,4.62
FastLanes,0.1.4,Weather_Forcast,6,Column_7,DOUBLE,12463,"{[EXP_DICT_DBL_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.19,1.52
FastLanes,0.1.4,Weather_Forcast,7,Column_7,INT8,14093,"{[EXP_DICT_I08_FFOR_SLPATCH_U08][0, 1, 2, 3, 4, 5, 6]}",0.22,1.72
6 changes: 6 additions & 0 deletions benchmark/result/compression_time/time_series/fastlanes.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
table_name,version,compression_time_ms,n_repetition
AMPds,0.1.4,64.601,1
Computer_Monitor,0.1.4,21.5683,1
Linear_Road,0.1.4,1232.85,1
Smart_Gird,0.1.4,32.1722,1
Weather_Forcast,0.1.4,41.9882,1
6 changes: 6 additions & 0 deletions benchmark/result/decompression_time/time_series/fastlanes.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
table_name,version,decompression_time_ms,n_repetition
AMPds,0.1.4,71.3487,1000
Computer_Monitor,0.1.4,18.7312,1000
Linear_Road,0.1.4,24.1296,1000
Smart_Gird,0.1.4,17.0261,1000
Weather_Forcast,0.1.4,28.9171,1000
35 changes: 35 additions & 0 deletions data/include/data/TimeSeries.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// ────────────────────────────────────────────────────────
// | FastLanes |
// ────────────────────────────────────────────────────────
// data/include/data/TimeSeries.hpp
// ────────────────────────────────────────────────────────
#ifndef DATA_TIMESERIES_HPP
#define DATA_TIMESERIES_HPP

#include <array>
#include <string_view>

namespace fastlanes {

using timeseries_dataset_t = std::array<std::pair<std::string_view, std::string_view>, 5>;

// clang-format off
class TimeSeries {
public:
static constexpr std::string_view AMPds { FASTLANES_DATA_DIR "/time_series/tables/AMPds" };
static constexpr std::string_view WEATHER_FORCAST { FASTLANES_DATA_DIR "/time_series/tables/Weather_Forcast" };
static constexpr std::string_view SMART_GRID { FASTLANES_DATA_DIR "/time_series/tables/Smart_Grid" };
static constexpr std::string_view LINEAR_ROEAD { FASTLANES_DATA_DIR "/time_series/tables/Linear_Road" };
static constexpr std::string_view COMPUTER_MONITOR { FASTLANES_DATA_DIR "/time_series/tables/Computer_Monitor" };
static constexpr timeseries_dataset_t dataset = {{
{ "AMPds", AMPds },
{ "Weather_Forcast", WEATHER_FORCAST },
{ "Smart_Grid", SMART_GRID },
{ "Linear_Road", LINEAR_ROEAD },
{ "Computer_Monitor", COMPUTER_MONITOR }
}};
};

} // namespace fastlanes

#endif // DATA_TIMESERIES_HPP
1 change: 1 addition & 0 deletions data/include/data/fastlanes_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#define DATA_FASTLANES_DATA_HPP

#include "data/NextiaJD.hpp"
#include "data/TimeSeries.hpp"
#include "data/clickbench.hpp"
#include "data/embedding.hpp"
#include "data/example.hpp"
Expand Down
1 change: 1 addition & 0 deletions test/src/dataset_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ add_executable(
generated_data.cpp
issues.cpp
nextiajd_test.cpp
timeseries_test.cpp
public_bi.cpp
test_fc_bench.cpp
tpch.cpp
Expand Down
28 changes: 28 additions & 0 deletions test/src/dataset_tests/timeseries_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// ────────────────────────────────────────────────────────
// | FastLanes |
// ────────────────────────────────────────────────────────
// test/src/dataset_tests/timeseries_test.cpp
// ────────────────────────────────────────────────────────
#include "data/TimeSeries.hpp"
#include "fastlanes.hpp"
#include "fls_tester.hpp"

namespace fastlanes {

#define TIMESERIES_TEST(DATASET_VAR) \
TEST_F(FastLanesReaderTester, TimeSeries_##DATASET_VAR) { \
const std::vector<n_t> constant_cols {}; \
const std::vector<n_t> equal_cols {}; \
const std::vector<n_t> one_to_one_mapped_col_indexes {}; \
AllTest(TimeSeries::DATASET_VAR, constant_cols, equal_cols, one_to_one_mapped_col_indexes); \
}

TIMESERIES_TEST(SMART_GRID)
TIMESERIES_TEST(LINEAR_ROEAD)
TIMESERIES_TEST(COMPUTER_MONITOR)
TIMESERIES_TEST(AMPds)
TIMESERIES_TEST(WEATHER_FORCAST)

#undef TIMESERIES_TEST

} // namespace fastlanes
2 changes: 1 addition & 1 deletion test/src/quick_fuzz_tests/fuzz_config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"num_cases": 10,
"base_seed": 12,
"base_seed": 13,
"delimiter": "|",
"min_cols": 1,
"max_cols": 2,
Expand Down
Loading