Skip to content

Commit e30e340

Browse files
committed
More fixes
Signed-off-by: Adam Gutglick <[email protected]>
1 parent 2118130 commit e30e340

File tree

12 files changed

+26
-25
lines changed

12 files changed

+26
-25
lines changed

.github/workflows/bench-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
env:
9191
RUST_BACKTRACE: full
9292
run: |
93-
target/release_debug/${{ matrix.benchmark.id }} -d gh-json
93+
target/release_debug/${{ matrix.benchmark.id }} -d gh-json -o results.json
9494
9595
- name: Setup AWS CLI
9696
if: github.event.pull_request.head.repo.fork == false
@@ -124,7 +124,7 @@ jobs:
124124
125125
echo '# Benchmarks: ${{ matrix.benchmark.name }}' > comment.md
126126
echo '' >> comment.md
127-
uv run --no-project scripts/compare-benchmark-jsons.py base.json target/vortex-bench/${{ matrix.benchmark.id }}/results.json "${{ matrix.benchmark.name }}" \
127+
uv run --no-project scripts/compare-benchmark-jsons.py base.json results.json "${{ matrix.benchmark.name }}" \
128128
>> comment.md
129129
130130
- name: Comment PR

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@ jobs:
399399
if: ${{ matrix.suite == 'tpc-h' }}
400400
# We use i2 to ensure that restarting the duckdb connection succeeds
401401
run: |
402-
cargo run --bin datafusion-bench -- tpch -i2 --formats "vortex,vortex-compact" --options scale-factor=0.1
403-
cargo run --bin duckdb-bench -- tpch -i2 --formats "vortex,vortex-compact" --options scale-factor=0.1
402+
cargo run --bin datafusion-bench -- tpch -i2 --formats "vortex,vortex-compact" --opt scale-factor=0.1
403+
cargo run --bin duckdb-bench -- tpch -i2 --formats "vortex,vortex-compact" --opt scale-factor=0.1
404404
- name: Run FFI Example
405405
if: ${{ matrix.suite == 'ffi' }}
406406
run: |

.github/workflows/sql-benchmarks.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146
# Build options string if scale_factor is set
147147
opts=""
148148
if [ -n "${{ matrix.scale_factor }}" ]; then
149-
opts="--options scale_factor=${{ matrix.scale_factor }}"
149+
opts="--opt scale_factor=${{ matrix.scale_factor }}"
150150
fi
151151
152152
# Generate all data formats with a single command
@@ -198,7 +198,7 @@ jobs:
198198
# Build options string if scale_factor is set
199199
opts=""
200200
if [ -n "${{ matrix.scale_factor }}" ]; then
201-
opts="--options scale_factor=${{ matrix.scale_factor }}"
201+
opts="--opt scale_factor=${{ matrix.scale_factor }}"
202202
fi
203203
204204
touch results.json
@@ -252,9 +252,9 @@ jobs:
252252
df_formats=$(echo "${{ matrix.targets }}" | tr ',' '\n' | grep '^datafusion:' | sed 's/datafusion://' | tr '\n' ',' | sed 's/,$//')
253253
254254
# Build options string if scale_factor is set
255-
opts="--options remote_data_dir=${{ matrix.remote_storage }}"
255+
opts="--opt remote_data_dir=${{ matrix.remote_storage }}"
256256
if [ -n "${{ matrix.scale_factor }}" ]; then
257-
opts="--options scale_factor=${{ matrix.scale_factor }} ${opts}"
257+
opts="--opt scale_factor=${{ matrix.scale_factor }} ${opts}"
258258
fi
259259
260260
touch results.json

bench-orchestrator/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ vx-bench run <benchmark> [options]
5151
- `--exclude-queries`: Queries to skip
5252
- `--iterations, -i`: Iterations per query (default: 5)
5353
- `--label, -l`: Label for this run (useful for later reference)
54-
- `--scale-factor, -s`: Scale factor for TPC benchmarks
5554
- `--track-memory`: Enable memory usage tracking
5655
- `--build/--no-build`: Build binaries before running (default: build)
5756

bench-orchestrator/bench_orchestrator/cli.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""CLI for benchmark orchestration."""
55

66
from datetime import datetime, timedelta
7-
from typing import Annotated
7+
from typing import Annotated, List
88

99
import pandas as pd
1010
import typer
@@ -67,23 +67,25 @@ def run(
6767
exclude_queries: Annotated[str | None, typer.Option("--exclude-queries", help="Queries to skip")] = None,
6868
iterations: Annotated[int, typer.Option("--iterations", "-i", help="Iterations per query")] = 5,
6969
label: Annotated[str | None, typer.Option("--label", "-l", help="Label for this run")] = None,
70-
scale_factor: Annotated[
71-
str | None, typer.Option("--scale-factor", "-s", help="Scale factor for TPC benchmarks")
72-
] = None,
7370
track_memory: Annotated[bool, typer.Option("--track-memory", help="Track memory usage")] = False,
7471
build: Annotated[bool, typer.Option("--build/--no-build", help="Build binaries before running")] = True,
7572
verbose: Annotated[bool, typer.Option("--verbose", "-v", help="Log underlying commands")] = False,
73+
options: Annotated[list[str] | None, typer.Option("--opt", help="Engine or benchmark specific options")] = None,
7674
) -> None:
7775
"""Run benchmarks with specified configuration."""
7876
engines = parse_engines(engine)
7977
formats = parse_formats(format)
8078
query_list = parse_queries(queries)
8179
exclude_list = parse_queries(exclude_queries)
82-
80+
bench_opts = {}
8381
# Build options dict
84-
options: dict[str, str] = {}
85-
if scale_factor:
86-
options["scale_factor"] = scale_factor
82+
if options:
83+
for opt in options:
84+
for s in opt.split(","):
85+
k, v, *rest = s.split("=")
86+
if rest:
87+
raise RuntimeError("Options must be key-value pairs separated by =")
88+
bench_opts[k] = v
8789

8890
config = RunConfig(
8991
benchmark=benchmark,
@@ -93,7 +95,7 @@ def run(
9395
exclude_queries=exclude_list,
9496
iterations=iterations,
9597
label=label,
96-
options=options,
98+
options=bench_opts,
9799
track_memory=track_memory,
98100
)
99101

bench-orchestrator/bench_orchestrator/runner/executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def run(
7272
cmd.append("--track-memory")
7373
if options:
7474
for k, v in options.items():
75-
cmd.extend(["--options", f"{k}={v}"])
75+
cmd.extend(["--opt", f"{k}={v}"])
7676

7777
if self.verbose:
7878
console.print(f"[dim]$ {' '.join(cmd)}[/dim]")

benchmarks/compress-bench/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct Args {
6767
datasets: Option<String>,
6868
#[arg(short, long, default_value_t, value_enum)]
6969
display_format: DisplayFormat,
70-
#[arg(short)]
70+
#[arg(short, long)]
7171
output_path: Option<PathBuf>,
7272
#[arg(long)]
7373
tracing: bool,

benchmarks/datafusion-bench/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ struct Args {
9090
#[arg(long, value_delimiter = ',', value_parser = value_parser!(Format))]
9191
formats: Vec<Format>,
9292

93-
#[arg(long, value_delimiter = ',', value_parser = value_parser!(Opt))]
93+
#[arg(long = "opt", value_delimiter = ',', value_parser = value_parser!(Opt))]
9494
options: Vec<Opt>,
9595
}
9696

benchmarks/duckdb-bench/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct Args {
6565
#[arg(long, value_delimiter = ',', value_parser = value_parser!(Format))]
6666
formats: Vec<Format>,
6767

68-
#[arg(long, value_delimiter = ',', value_parser = value_parser!(Opt))]
68+
#[arg(long = "opt", value_delimiter = ',', value_parser = value_parser!(Opt))]
6969
options: Vec<Opt>,
7070
}
7171

benchmarks/lance-bench/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct Args {
6363
#[arg(long, default_value_t = false)]
6464
track_memory: bool,
6565

66-
#[arg(long, value_delimiter = ',', value_parser = value_parser!(Opt))]
66+
#[arg(long = "opt", value_delimiter = ',', value_parser = value_parser!(Opt))]
6767
options: Vec<Opt>,
6868
}
6969

0 commit comments

Comments
 (0)