Benchmark Usage#
Paimon C++ provides Google Benchmark based cases for append-table write/read and primary-key table write/MOR read paths. Benchmarks are disabled by default.
Build#
Enable benchmarks when configuring CMake:
cmake -S . -B build -DPAIMON_BUILD_BENCHMARKS=ON
cmake --build build --target paimon-read-write-benchmark
Run all benchmark cases through CTest:
cmake --build build --target benchmark
Custom Options#
paimon-read-write-benchmark accepts Google Benchmark options plus the Paimon
specific options below:
--paimon_source_data_file=<path>Source data file used to build benchmark data. Currently Parquet source files are supported.
--paimon_source_table_path=<path>Read directly from an existing table path for
BM_ReadandBM_MOR_Read. When set, the source loading and pre-write stage are skipped.--paimon_pk_columns=<col1,col2,...>Primary key columns for
BM_PK_WriteandBM_MOR_Read. These cases explicitly usebucket=1because benchmark batches are written to bucket 0.--paimon_option=<key1>:<value1>;<key2>:<value2>Repeatable table options passed through to Paimon. The default table file format is
parquet; use--paimon_option file.format:<format>to override it. ForBM_PK_WriteandBM_MOR_Read,bucketis forced to1.
Examples#
Append table write:
paimon-read-write-benchmark \
--paimon_source_data_file /path/data.parquet \
--benchmark_filter=BM_Write
Append table read with four prefetch workers:
paimon-read-write-benchmark \
--paimon_source_data_file /path/data.parquet \
--benchmark_filter=BM_Read/4
Primary-key table write:
paimon-read-write-benchmark \
--paimon_source_data_file /path/data.parquet \
--paimon_pk_columns=id \
--benchmark_filter=BM_PK_Write
MOR read from an existing table:
paimon-read-write-benchmark \
--paimon_source_table_path /path/table \
--paimon_pk_columns=id \
--benchmark_filter=BM_MOR_Read/4