Skip to content

Commit eba66d2

Browse files
connortsui20dimitarvdimitrov
authored andcommitted
Print to stdout in compress-bench and random-access-bench (#7065)
## Summary For these 2, if you don't specify an output file it doesn't print to stdout. This change fixes that (brings it in line with the other benchmarks). ## Testing N/A Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
1 parent 9b863c5 commit eba66d2

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

benchmarks/compress-bench/src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use indicatif::ProgressBar;
1313
use itertools::Itertools;
1414
use regex::Regex;
1515
use vortex::utils::aliases::hash_map::HashMap;
16-
use vortex_bench::BenchmarkOutput;
1716
use vortex_bench::Engine;
1817
use vortex_bench::Format;
1918
use vortex_bench::Target;
@@ -23,6 +22,7 @@ use vortex_bench::compress::Compressor;
2322
use vortex_bench::compress::benchmark_compress;
2423
use vortex_bench::compress::benchmark_decompress;
2524
use vortex_bench::compress::calculate_ratios;
25+
use vortex_bench::create_output_writer;
2626
use vortex_bench::datasets::Dataset;
2727
use vortex_bench::datasets::struct_list_of_ints::StructListOfInts;
2828
use vortex_bench::datasets::taxi_data::TaxiData;
@@ -169,8 +169,7 @@ async fn run_compress(
169169

170170
progress.finish();
171171

172-
let output = BenchmarkOutput::with_path(BENCHMARK_ID, output_path);
173-
let mut writer = output.create_writer()?;
172+
let mut writer = create_output_writer(&display_format, output_path, BENCHMARK_ID)?;
174173

175174
match display_format {
176175
DisplayFormat::Table => {

benchmarks/random-access-bench/src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ use rand::SeedableRng;
1414
use rand::rngs::StdRng;
1515
use rand_distr::Distribution;
1616
use rand_distr::Exp;
17-
use vortex_bench::BenchmarkOutput;
1817
use vortex_bench::Engine;
1918
use vortex_bench::Format;
2019
use vortex_bench::Target;
20+
use vortex_bench::create_output_writer;
2121
use vortex_bench::datasets::feature_vectors::FeatureVectorsData;
2222
use vortex_bench::datasets::nested_lists::NestedListsData;
2323
use vortex_bench::datasets::nested_structs::NestedStructsData;
@@ -416,8 +416,7 @@ async fn run_random_access(
416416

417417
progress.finish();
418418

419-
let output = BenchmarkOutput::with_path(BENCHMARK_ID, output_path);
420-
let mut writer = output.create_writer()?;
419+
let mut writer = create_output_writer(&display_format, output_path, BENCHMARK_ID)?;
421420

422421
match display_format {
423422
DisplayFormat::Table => {

0 commit comments

Comments
 (0)