T-93: M1.2k — tools/curate-etl: Zstd Parquet writer for events/year=YYYY/part.parquet (contract schema, atomic year-partitioned publish) with round-trip tests and local benchmark (no new crates)
This commit is contained in:
parent
f92b267e71
commit
4e344bcc2e
9 changed files with 3016 additions and 9 deletions
|
|
@ -5,8 +5,9 @@ use std::process::ExitCode;
|
|||
|
||||
use curate_etl::bench::{
|
||||
run_adj_benchmark, run_bars_benchmark, run_corporate_actions_benchmark, run_events_benchmark,
|
||||
run_fx_benchmark, run_parquet_bars_benchmark, run_parquet_shorts_benchmark,
|
||||
run_provider_mapping_benchmark, run_shorts_benchmark, run_split_benchmark,
|
||||
run_fx_benchmark, run_parquet_bars_benchmark, run_parquet_events_benchmark,
|
||||
run_parquet_shorts_benchmark, run_provider_mapping_benchmark, run_shorts_benchmark,
|
||||
run_split_benchmark,
|
||||
};
|
||||
use curate_etl::cli::{format_usage, format_usage_stderr, parse_args, CliAction};
|
||||
|
||||
|
|
@ -355,6 +356,36 @@ fn main() -> ExitCode {
|
|||
);
|
||||
ExitCode::SUCCESS
|
||||
}
|
||||
Ok(CliAction::BenchParquetEvents(rows)) => {
|
||||
let report = match run_parquet_events_benchmark(rows) {
|
||||
Ok(report) => report,
|
||||
Err(err) => {
|
||||
eprintln!("error: parquet events benchmark failed: {err}");
|
||||
return ExitCode::FAILURE;
|
||||
}
|
||||
};
|
||||
println!("curate-etl bench-parquet-events");
|
||||
println!(
|
||||
" input: rows={} listings={} avg_raw_row_bytes={:.1}",
|
||||
report.rows, report.listing_count, report.avg_raw_row_bytes
|
||||
);
|
||||
println!(
|
||||
" output: files={} row_groups={} bytes={} read_back_rows={}",
|
||||
report.files_written,
|
||||
report.row_groups_written,
|
||||
report.bytes_written,
|
||||
report.read_back_rows
|
||||
);
|
||||
println!(
|
||||
" perf: elapsed={:.2} ms throughput={:.0} rows/s write={:.2} MB/s size={:.2} bytes/row compression={:.2}x",
|
||||
report.elapsed_ms,
|
||||
report.rows_per_sec,
|
||||
report.mb_per_sec,
|
||||
report.bytes_per_row,
|
||||
report.compression_ratio
|
||||
);
|
||||
ExitCode::SUCCESS
|
||||
}
|
||||
Err(msg) => {
|
||||
eprintln!("error: {msg}");
|
||||
eprintln!("{}", format_usage_stderr(NAME));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue