Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
b7f2337
Add Rerun reader
guipenedo Jun 14, 2026
917aee3
Add Rerun writer
guipenedo Jun 14, 2026
14c1d01
Harden Rerun reader and writer
guipenedo Jun 14, 2026
276bd9f
Support explicit Rerun robotics selections
guipenedo Jun 14, 2026
0c580c9
Document Rerun reader and writer
guipenedo Jun 14, 2026
d6faf32
Clean up Rerun docs whitespace
guipenedo Jun 14, 2026
087e2d3
Avoid unused Rerun static reads
guipenedo Jun 14, 2026
aa80558
Polish Rerun reader and writer
guipenedo Jun 14, 2026
012167a
Add Rerun cloud benchmark harness
guipenedo Jun 14, 2026
4e7b2f6
Harden Rerun cloud benchmark harness
guipenedo Jun 14, 2026
2331a1f
Skip unused Rerun metadata reads
guipenedo Jun 14, 2026
98f5f7b
Avoid redundant Rerun schema work
guipenedo Jun 14, 2026
85c4ccd
Cover Rerun robotics recording payloads
guipenedo Jun 14, 2026
0e6ec55
Add Rerun benchmark comparison helper
guipenedo Jun 14, 2026
617dbf2
Add Rerun benchmark AWS secret refresher
guipenedo Jun 14, 2026
7241054
Avoid logging Rerun benchmark secret payloads
guipenedo Jun 14, 2026
666727a
Silence Rerun benchmark secret refresh output
guipenedo Jun 14, 2026
234006f
Use benchmark AWS profile by default
guipenedo Jun 14, 2026
1bdad4e
Use supported AWS credential export format
guipenedo Jun 14, 2026
337cafa
Reuse Rerun schema component maps
guipenedo Jun 14, 2026
6b70f59
Fill Rerun scalar matrices in place
guipenedo Jun 14, 2026
e0df9ec
Cache Rerun encoded image offsets
guipenedo Jun 14, 2026
0f0cd22
Revert "Cache Rerun encoded image offsets"
guipenedo Jun 14, 2026
b84ff52
Track Rerun metadata and output metrics
guipenedo Jun 14, 2026
31b96b7
Harden Rerun output column collisions
guipenedo Jun 14, 2026
3de8e90
Skip Rerun tables for raw copy benchmarks
guipenedo Jun 14, 2026
7c6856a
Optimize Rerun raw copy path
guipenedo Jun 14, 2026
54c31ad
Track Rerun benchmark shard planning
guipenedo Jun 14, 2026
99918bf
Harden Rerun writer edge cases
guipenedo Jun 14, 2026
9e2f1c0
Harden Rerun support and cloud metadata
guipenedo Jun 15, 2026
ad1b9e6
Fast-path raw Rerun copies
guipenedo Jun 15, 2026
f48d964
Add local Rerun copy benchmark
guipenedo Jun 15, 2026
1ceceaa
Avoid double metadata scans for raw Rerun copies
guipenedo Jun 15, 2026
cd3fb05
Hardlink staged Rerun copies on local filesystems
guipenedo Jun 15, 2026
dc8eb99
Refine raw Rerun fast path and batch benchmark
guipenedo Jun 15, 2026
06c04f3
Trim raw Rerun source chunk overhead
guipenedo Jun 15, 2026
af65e54
Speed up batched Rerun writer loop
guipenedo Jun 15, 2026
7323294
Refine Rerun benchmark timing and writer loop
guipenedo Jun 15, 2026
8ec50e2
Reduce local Rerun writer path overhead
guipenedo Jun 15, 2026
9995f3b
Speed up default local Rerun writes
guipenedo Jun 15, 2026
0d6d90e
Speed up local-to-remote DataFile copies
guipenedo Jun 15, 2026
905221d
Tune local-to-remote upload buffering
guipenedo Jun 15, 2026
24406de
Parallelize staged Rerun source opens
guipenedo Jun 15, 2026
0917053
Parallelize Rerun metadata scans
guipenedo Jun 15, 2026
d322b0c
Tweak Rerun batch staging concurrency
guipenedo Jun 15, 2026
63305f7
Revert Rerun batch staging oversubscription
guipenedo Jun 15, 2026
7df6d30
Fuse Rerun metadata staging passes
guipenedo Jun 15, 2026
004a69c
Revert "Fuse Rerun metadata staging passes"
guipenedo Jun 15, 2026
cde8671
Trim Rerun metadata scan wrappers
guipenedo Jun 15, 2026
85ea278
Fast-path single-store Rerun lookup
guipenedo Jun 15, 2026
e282400
Revert "Fast-path single-store Rerun lookup"
guipenedo Jun 15, 2026
44920e2
Direct-copy raw Rerun source chunks
guipenedo Jun 15, 2026
9a8cc38
Prefer native remote RRD staging
guipenedo Jun 15, 2026
abbf4a7
Revert native remote RRD staging
guipenedo Jun 15, 2026
e15f2b7
Increase RRD staging buffer size
guipenedo Jun 15, 2026
45a13fb
Raise RRD reader fanout
guipenedo Jun 15, 2026
6c71e6e
Back off RRD metadata scan fanout
guipenedo Jun 15, 2026
f9586ea
Revert RRD reader fanout
guipenedo Jun 15, 2026
170c51e
Optimize default RRD cleanup listing
guipenedo Jun 15, 2026
673fdc1
Speed up default RRD cleanup matching
guipenedo Jun 15, 2026
095c66c
Tighten default RRD cleanup parsing
guipenedo Jun 15, 2026
f049027
Add cleanup matcher benchmark
guipenedo Jun 15, 2026
7fe8bee
Speed up cleanup key lookup
guipenedo Jun 15, 2026
83ff8f2
Precompute cleanup matcher keys
guipenedo Jun 15, 2026
26b0a2b
Restore cleanup best recipe
guipenedo Jun 15, 2026
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
2 changes: 2 additions & 0 deletions benchmark/rerun/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
artifacts/
__pycache__/
118 changes: 118 additions & 0 deletions benchmark/rerun/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Rerun Benchmarks

This folder contains cloud benchmark harnesses for Rerun RRD workloads.

- `run_cloud_benchmark.py`: submits Macrodata Cloud jobs for Rerun read,
robotics conversion, and Rerun write paths, then writes JSON artifacts with
job ids, stage timings, metrics, and output inspection.
- `compare_results.py`: compares two benchmark `summary.json` artifacts and
prints case-level and stage-level timing deltas.
- `refresh_aws_secrets.py`: copies short-lived credentials from an AWS CLI
profile into the Macrodata workspace secret environment used by cloud jobs.
- `run_local_benchmark.py`: runs a local single-recording RRD copy benchmark
that compares the direct byte-copy path with the chunk-selection fallback.
- `run_cleanup_benchmark.py`: runs a local benchmark for the default-root RRD
cleanup matcher used by `FileCleanupReducerSink`.

The default inputs are the ten base RRD files from:

```text
s3://macrodata-rerun-format-tests/dominique-sample/
```

The default cases are:

- `recording-summary`: `read_rerun(output="recording")`, summarize timeline
and static tables, write JSONL.
- `robotics-summary`: `read_rerun(output="robotics")` for action/state paths,
summarize frame rows and vector widths, write JSONL.
- `rrd-copy`: `read_rerun(output="recording", materialize_tables=False)`
followed by `write_rerun(...)` to exercise the distributed RRD writer's raw
chunk path without timing unused Arrow table materialization.

These cases intentionally cover both the high-fidelity recording path and the
robotics convenience path. Do not remove a case just to make a performance run
look better.

## Prerequisites

- The current branch must be pushed and available on a GitHub PR before cloud
launch.
- Macrodata CLI auth must be configured.
- Workspace secrets in the selected environment must include AWS credentials
for the source/output S3 bucket. The default environment is `researcher`.
Pass `--aws-profile` explicitly when refreshing those credentials; the helper
intentionally does not fall back to the AWS default profile.

If local AWS credentials are valid, refresh the cloud secret environment without
printing credential values:

```bash
uv run python benchmark/rerun/refresh_aws_secrets.py \
--aws-profile 210049840512_Researcher \
--secret-env researcher
```

## Run

```bash
REFINER_ATTACH=detach uv run python benchmark/rerun/run_cloud_benchmark.py
```

Useful options:

- `--case robotics-summary --case rrd-copy` to run a subset.
- `--iterations 3` to repeat each case.
- `--input s3://bucket/path/file.rrd` to use custom inputs; repeat as needed.
- `--output-root s3://bucket/prefix` to choose where cloud outputs are written.
- `--num-workers 4` to vary cloud parallelism.
- `--aws-profile 210049840512_Researcher` to inspect S3 outputs locally with a
specific profile after cloud completion.
- `--continue-on-failure` to keep launching later cases after one case fails.
By default the harness records the failed case and stops, so bad credentials or
setup failures do not create a misleading benchmark session.

For a local smoke benchmark that does not require cloud credentials:

```bash
uv run python benchmark/rerun/run_local_benchmark.py
```

For the reducer cleanup matcher benchmark:

```bash
uv run python benchmark/rerun/run_cleanup_benchmark.py
```

The local benchmark generates a synthetic single-recording RRD, then measures
the direct-copy branch against the chunk-selection fallback on the same source
file. Use `--writes-per-iteration` to repeat the same shard write within one
timed run when you want to amplify per-row writer overhead.

For cloud runs, the summary also records `stage_duration_s`, the sum of stage
durations. That is often a better performance signal than wall time because it
excludes queueing noise from the cloud scheduler.

Artifacts are written under `benchmark/rerun/artifacts/` by default:

- one per-case result JSON
- one summary JSON for the benchmark session

Each case records `planned_shards`. RRD files are file-atomic, so runs where
`planned_shards < --num-workers` can underutilize workers and should not be used
as scaling evidence.

## Compare

After running a baseline and candidate benchmark, compare their summaries:

```bash
uv run python benchmark/rerun/compare_results.py \
benchmark/rerun/artifacts/baseline/summary.json \
benchmark/rerun/artifacts/candidate/summary.json
```

Only completed jobs are used for timing deltas. Failed jobs still appear in the
run-count columns so setup problems are visible instead of silently averaged in.
Planned shard counts and shard-planning warnings are printed with the timing
table.
Loading
Loading