Skip to content
Merged
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
14 changes: 11 additions & 3 deletions .github/workflows/benchmark-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,23 @@ jobs:
- name: Synchronize frozen Python environment
run: nix develop --command uv sync --frozen

- name: Install isolated TsFile claim dependencies
if: inputs.profile == 'claims'
run: |
nix develop --command uv pip install --python .venv/bin/python \
pytz==2026.2 tzdata==2026.3
nix develop --command uv pip install --python .venv/bin/python --no-deps \
pandas==2.2.3 tsfile==2.3.1

- name: Run selected benchmark lane
id: benchmark
run: |
result=$(nix develop --command uv run --frozen format-bench run \
result=$(nix develop --command .venv/bin/format-bench run \
--profile "${{ inputs.profile }}" \
--dataset github-stars-2026-07-03)
run_dir=$(dirname "$result")
nix develop --command uv run --frozen format-bench report --run-dir "$run_dir"
archive=$(nix develop --command uv run --frozen format-bench package \
nix develop --command .venv/bin/format-bench report --run-dir "$run_dir"
archive=$(nix develop --command .venv/bin/format-bench package \
--run-dir "$run_dir" \
--platform linux-x86_64)
echo "archive=$archive" >> "$GITHUB_OUTPUT"
Expand Down
12 changes: 11 additions & 1 deletion src/format_bench/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,17 @@ def _sha256(path: Path) -> str:

def environment_info(root: Path) -> dict:
packages = {}
for name in ("pyarrow", "pylance", "tiktoken", "vortex-data", "zstandard"):
for name in (
"pandas",
"pyarrow",
"pylance",
"pytz",
"tiktoken",
"tsfile",
"tzdata",
"vortex-data",
"zstandard",
):
try:
packages[name] = version(name)
except PackageNotFoundError:
Expand Down
6 changes: 6 additions & 0 deletions tests/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from format_bench.runner import (
Job,
MeasurementConfig,
environment_info,
measure_callable,
run_job,
stats_ms,
Expand Down Expand Up @@ -47,3 +48,8 @@ def test_run_job_aggregates_fresh_process_output(tmp_path: Path) -> None:
assert result["fresh_process"]["samples"] == 2
assert result["warm"]["samples"] == 4
assert result["max_rss_bytes_p50"] == 100


def test_environment_records_isolated_claim_dependencies() -> None:
packages = environment_info(Path(__file__).parents[1])["packages"]
assert {"pandas", "pytz", "tsfile", "tzdata"} <= packages.keys()
Loading