Skip to content

ci: compare benchmark PRs with main - #5639

Merged
Yicong-Huang merged 1 commit into
apache:mainfrom
Yicong-Huang:ci/benchmark-main-comparison
Jun 12, 2026
Merged

Yicong-Huang merged 1 commit into
apache:mainfrom
Yicong-Huang:ci/benchmark-main-comparison

Conversation

@Yicong-Huang

@Yicong-Huang Yicong-Huang commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Update the benchmark PR comment workflow to show PR benchmark results next to the latest main baseline and the 7-day average baseline published on gh-pages.

The comment now reads the PR run artifact JSON/CSV files and gh-pages:/dev/bench/data.js, then renders a compact report:

Section What reviewers see
Verdict Material regression/no-regression summary
Noise threshold Changes within ±5% are treated as CI noise
Summary 🟢 better · 🔴 worse · ⚪ within ±5% noise metric counts
Links Benchmark dashboard and full workflow run
Main table One row per PR benchmark config, with compact icon/value/delta cells
Details Collapsed latest-main and 7-day-average baseline table
Metrics Throughput, MB/s, and latency percentiles

Throughput and MB/s deltas mark higher values as better; latency deltas mark lower values as better. If the baseline cannot be loaded, the workflow falls back to the existing PR-only CSV table. The comment includes a disclaimer that CI benchmark machines are noisy and small deltas should be treated cautiously.

Any related issues, documentation, discussions?

Closes #5638

How was this PR tested?

ruby -e "require %q(yaml); YAML.load_file(%q(.github/workflows/benchmarks-pr-comment.yml)); puts %q(YAML OK)"
ruby -e "require %q(yaml); y=YAML.load_file(%q(.github/workflows/benchmarks-pr-comment.yml)); puts y[%q(jobs)][%q(comment)][%q(steps)][3][%q(with)][%q(script)]" | node --input-type=module --check
git diff --check
gh run download 27397378517 --repo apache/texera --name bench-results-27397378517 --dir /tmp/texera-bench-compare-pr5639
# Locally simulated the compact rich PR-vs-main comment against:
# https://raw.githubusercontent.com/apache/texera/gh-pages/dev/bench/data.js

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Codex (GPT-5)

@github-actions github-actions Bot added the ci changes related to CI label Jun 12, 2026
@codecov-commenter

codecov-commenter commented Jun 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.50%. Comparing base (1572edf) to head (24f7423).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5639      +/-   ##
============================================
- Coverage     52.51%   52.50%   -0.01%     
+ Complexity     2484     2482       -2     
============================================
  Files          1071     1071              
  Lines         41363    41363              
  Branches       4441     4441              
============================================
- Hits          21720    21716       -4     
- Misses        18371    18372       +1     
- Partials       1272     1275       +3     
Flag Coverage Δ *Carryforward flag
access-control-service 64.61% <ø> (ø)
agent-service 34.36% <ø> (ø)
amber 53.28% <ø> (-0.02%) ⬇️
computing-unit-managing-service 1.65% <ø> (ø)
config-service 56.71% <ø> (ø)
file-service 38.21% <ø> (ø)
frontend 47.10% <ø> (ø)
pyamber 90.72% <ø> (ø)
python 90.75% <ø> (ø) Carriedforward from 1572edf
workflow-compiling-service 58.69% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Yicong-Huang
Yicong-Huang force-pushed the ci/benchmark-main-comparison branch from 49a187f to f857c37 Compare June 12, 2026 05:50
@github-actions

github-actions Bot commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

Arrow Flight E2E bench

batch schema_w str_len n_batches tuples/s MB/s p50 ms p99 ms total ms
10 10 64 20 422 0.257 23.50 30.27 474.32
100 10 64 20 956 0.584 104.51 124.88 2091.84
1000 10 64 20 1095 0.668 912.62 954.38 18264.93
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,474.32,200,128000,422,0.257,23503.94,30272.06,30272.06
1,100,10,64,20,2091.84,2000,1280000,956,0.584,104508.25,124883.26,124883.26
2,1000,10,64,20,18264.93,20000,12800000,1095,0.668,912615.70,954378.37,954378.37

Full workflow run

@Yicong-Huang
Yicong-Huang marked this pull request as ready for review June 12, 2026 06:00
@Yicong-Huang

Yicong-Huang commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Preview generated from fork branch ci/benchmark-main-comparison using #5639 benchmark artifact and the live gh-pages baseline.

⚠️ Benchmark changes need a look

🟢 0 better · 🔴 4 worse · ⚪ 11 noise (<±5%)

CI benchmark results are noisy; treat <±5% as noise unless repeated.

Dashboard · Run

config throughput MB/s latency p50/p95/p99 max Δ latest / 7d
🔴 bs=10 sw=10 sl=64 402 0.245 23,842/35,316/35,316 🔴 +9.7% / 🔴 +10.3%
🔴 bs=100 sw=10 sl=64 926 0.565 108,608/127,075/127,075 🔴 +9.3% / 🟢 +8.1%
⚪ bs=1000 sw=10 sl=64 1,071 0.653 938,509/982,807/982,807 ⚪ <5% / 🟢 -9.7%
Baseline details

Latest main: 1572edf (2026-06-12T05:45:00.344Z)

config metric PR latest main 7d avg Δ latest Δ 7d
bs=10 sw=10 sl=64 throughput 402 tuples/sec 416.67 tuples/sec 404.3 tuples/sec -3.5% -0.6%
bs=10 sw=10 sl=64 MB/s 0.245 MB/s 0.254 MB/s 0.247 MB/s -3.7% -0.7%
bs=10 sw=10 sl=64 p50 23,842 us 25,005 us 25,333 us -4.7% -5.9%
bs=10 sw=10 sl=64 p95 35,316 us 32,182 us 32,019 us +9.7% +10.3%
bs=10 sw=10 sl=64 p99 35,316 us 32,182 us 32,019 us +9.7% +10.3%
bs=100 sw=10 sl=64 throughput 926 tuples/sec 938.37 tuples/sec 856.24 tuples/sec -1.3% +8.1%
bs=100 sw=10 sl=64 MB/s 0.565 MB/s 0.573 MB/s 0.523 MB/s -1.4% +8.1%
bs=100 sw=10 sl=64 p50 108,608 us 108,068 us 117,877 us +0.5% -7.9%
bs=100 sw=10 sl=64 p95 127,075 us 116,218 us 134,083 us +9.3% -5.2%
bs=100 sw=10 sl=64 p99 127,075 us 116,218 us 134,083 us +9.3% -5.2%
bs=1000 sw=10 sl=64 throughput 1,071 tuples/sec 1,095 tuples/sec 988.37 tuples/sec -2.2% +8.4%
bs=1000 sw=10 sl=64 MB/s 0.653 MB/s 0.668 MB/s 0.603 MB/s -2.3% +8.2%
bs=1000 sw=10 sl=64 p50 938,509 us 903,009 us 1,013,503 us +3.9% -7.4%
bs=1000 sw=10 sl=64 p95 982,807 us 990,044 us 1,088,546 us -0.7% -9.7%
bs=1000 sw=10 sl=64 p99 982,807 us 990,044 us 1,088,546 us -0.7% -9.7%
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,497.88,200,128000,402,0.245,23842.09,35315.91,35315.91
1,100,10,64,20,2159.57,2000,1280000,926,0.565,108607.53,127074.57,127074.57
2,1000,10,64,20,18682.28,20000,12800000,1071,0.653,938508.84,982807.28,982807.28

@Yicong-Huang
Yicong-Huang force-pushed the ci/benchmark-main-comparison branch 5 times, most recently from e8801ec to 43e9bf6 Compare June 12, 2026 06:20
@aglinxinyuan
aglinxinyuan requested a review from Copilot June 12, 2026 06:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Benchmarks PR Comment workflow to render a compact PR-vs-main benchmark report by loading the latest main baseline and 7-day average from gh-pages/dev/bench/data.js, with fallback to the existing PR-only CSV table.

Changes:

  • Add contents: read permission and logic to fetch/parse gh-pages/dev/bench/data.js as the main baseline.
  • Parse PR benchmark CSV into structured metrics and compute deltas with a ±5% noise threshold.
  • Render an updated PR comment layout including verdict/summary, dashboard/run links, and collapsible baseline details.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Yicong-Huang
Yicong-Huang force-pushed the ci/benchmark-main-comparison branch from 43e9bf6 to 24f7423 Compare June 12, 2026 07:08
@Yicong-Huang
Yicong-Huang added this pull request to the merge queue Jun 12, 2026
Merged via the queue into apache:main with commit 0731313 Jun 12, 2026
26 checks passed
@Yicong-Huang
Yicong-Huang deleted the ci/benchmark-main-comparison branch June 12, 2026 07:40
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
### What changes were proposed in this PR?
Update the benchmark PR comment workflow to show PR benchmark results
next to the latest main baseline and the 7-day average baseline
published on `gh-pages`.

The comment now reads the PR run artifact JSON/CSV files and
`gh-pages:/dev/bench/data.js`, then renders a compact report:

| Section | What reviewers see |
| --- | --- |
| Verdict | Material regression/no-regression summary |
| Noise threshold | Changes within ±5% are treated as CI noise |
| Summary | `🟢 better · 🔴 worse · ⚪ within ±5% noise` metric counts |
| Links | Benchmark dashboard and full workflow run |
| Main table | One row per PR benchmark config, with compact
icon/value/delta cells |
| Details | Collapsed latest-main and 7-day-average baseline table |
| Metrics | Throughput, MB/s, and latency percentiles |

Throughput and MB/s deltas mark higher values as better; latency deltas
mark lower values as better. If the baseline cannot be loaded, the
workflow falls back to the existing PR-only CSV table. The comment
includes a disclaimer that CI benchmark machines are noisy and small
deltas should be treated cautiously.

### Any related issues, documentation, discussions?
Closes apache#5638

### How was this PR tested?
```bash
ruby -e "require %q(yaml); YAML.load_file(%q(.github/workflows/benchmarks-pr-comment.yml)); puts %q(YAML OK)"
ruby -e "require %q(yaml); y=YAML.load_file(%q(.github/workflows/benchmarks-pr-comment.yml)); puts y[%q(jobs)][%q(comment)][%q(steps)][3][%q(with)][%q(script)]" | node --input-type=module --check
git diff --check
gh run download 27397378517 --repo apache/texera --name bench-results-27397378517 --dir /tmp/texera-bench-compare-pr5639
# Locally simulated the compact rich PR-vs-main comment against:
# https://raw.githubusercontent.com/apache/texera/gh-pages/dev/bench/data.js
```

### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-5)
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Nov 25, 2026
)

### What changes were proposed in this PR?

Remove unused imports, bindings, helpers and fields, and settings that
repeat a default or another entry, from the Amber Python runtime, the
Python test resources of the workflow compiler and operators, the `bin/`
licensing, local-dev and observability scripts, repository
configuration, and three GitHub workflows (**+102/-172 lines**). There
is no behavior change.

- **Amber Python runtime:** `StatisticsManager` uses `defaultdict`
instead of the deprecated `typing.DefaultDict`, and
`BroadcastPartitioner` builds its batch with `[]`.
`LargeBinaryOutputStream` raises and documents `OSError` (which
`IOError` aliases), wraps its best-effort cleanup delete in
`contextlib.suppress`, and drops the `pass` after `flush`'s docstring.
- **Operator verification test resources:** `py_op_driver.py` drops ten
`pytexera` imports and `RAW_TYPE_MAPPING` that it never reads. User code
runs in its own namespace seeded by `from pytexera import *`, so the
"used dynamically" note on those imports did not hold. `compare.py`
drops the uncalled `_string_columns` helper and two dict copies of
`double_kinds_a`/`double_kinds_e`, and `hf_parse_probe.py` drops unused
`io` and `re` imports. Quoted annotations, `open(..., "r")`,
`startswith` plus a slice, and a placeholder-free f-string take their
plain forms here and in `standalone_worker.py`, `py_compile_worker.py`
and `hf_binary_value_probe.py`.
- **`bin/` scripts:** the licensing tools use a tuple `startswith`, read
the one regex group they need instead of unpacking all four, print plain
strings where f-strings had no placeholders, return a `bool` expression
directly, drop annotation quotes under `from __future__ import
annotations`, use `removesuffix`, and name unused loop values `_`. Two
licensing tests drop `# noqa: E402` comments that suppress nothing under
Ruff, and `test_local_dev_tui.py` drops the never-passed `version`
parameter of `_seed_jvm_layout` together with the docstring sentence
about a jar it never wrote. `bin/observability/smoke_test.py` stops
returning an unread status from `_post`, builds the trace id from one
`uuid4().hex` (the first 32 hex digits of two concatenated ones were
always the first), and drops a `leaked = False` that both branches of
the following `try` overwrite.
- **Repository configuration:** `amber/pyproject.toml` drops
`line-length = 88` and `max-complexity = 10`, which are Ruff's defaults
(and `C901` is not selected). `.dockerignore` drops a root
`user-resources/` entry that its first rule, `**/user-resources/`,
already covers. `bin/fix-format.sh` drops the `""` case that
`TARGET="${1:-all}"` makes unreachable, and `bin/frontend-proto-gen.sh`
drops a `--proto_path` that repeats its `-I`.
`bin/k8s/templates/aws/.gitkeep` goes, since the folder holds
`s3-credentials-secret.yaml`. `bin/y-websocket-server/package.json`
drops npm-init's `main` and placeholder `test` script (the image runs
`npx y-websocket`), and a `bin/observability/docker-compose.yml` comment
stops pointing at a `start_app.sh` that the repository does not have.
- **GitHub workflows:** `comment-commands.yml` drops `github.event_name
== 'issue_comment' && github.event.action == 'created'` from three job
conditions, because the workflow only runs on `issue_comment:
[created]`. `pr-assignment.yml` drops a `|| ''` that follows a `typeof
... === 'string'` guard. `benchmarks-pr-comment.yml` stops storing
per-benchmark commit and date, a sample count and delta labels that
nothing reads, takes each row's status from the deltas it already
computed instead of a second `deltaInfo` pass, reuses each metric's
7-day delta, and builds the PR-only CSV table only when there is no
comparison to show.

| Event | PR / Commit |
| --- | --- |
| Introduced by | Amber Python runtime: apache#1891 (2023-05-01), apache#3262
(2025-02-18), apache#4100 (2025-12-15), apache#4707 (2026-05-03), apache#5249
(2026-06-06), apache#8260 (2026-11-18); test resources: apache#7207 (2026-08-14),
apache#8617 (2026-10-15), apache#9306 (2026-11-10), apache#8357 (2026-11-17), apache#8358
(2026-11-18), apache#8359 (2026-11-19); `bin/` scripts: apache#4387 (2026-04-29),
apache#4668 (2026-05-02), apache#4693 (2026-05-02), apache#4711 (2026-05-03), apache#5057
(2026-05-15), apache#5417 (2026-06-10), apache#5961 (2026-06-28), apache#5377
(2026-10-28); configuration: apache#3019 (2024-11-20), apache#3335 (2025-03-23),
apache#3441 (2025-05-19), apache#3890 (2025-10-14), apache#4005 (2025-10-29), apache#4105
(2025-12-05), apache#5757 (2026-06-24); workflows: apache#4885 (2026-05-03), apache#4986
(2026-05-08), apache#5148 (2026-05-22), apache#5557 (2026-06-11), apache#5639 (2026-06-12)
|
| Usage removed by | `issue_comment` checks: apache#4899 (2026-05-04, `ci:
drop the triage label, use is:open no:assignee filter`) moved `/take`
out of `issue-triage.yml`, which also ran on `issues` events, into a
workflow that only runs on created comments, and apache#4986 and apache#5148 copied
the checks into two new jobs; `aws/.gitkeep`: apache#5932 (2026-07-01,
`feat(k8s): make app-tier object storage configurable via storage.s3`)
added the folder's first template; PR-only CSV table: apache#5639 (2026-06-12,
`ci: compare benchmark PRs with main`) shows it only when there is no
comparison; everything else: unused or redundant since introduction |

As of 2026-11-23, the unread test-resource code is under a week old, the
`.gitkeep` placeholder and the unread benchmark fields have been
redundant for about 5 months, the `issue_comment` checks for over 6
months, and the duplicate `.dockerignore` entry and `--proto_path` for
20 and 24 months.

### Any related issues, documentation, discussions?

Closes apache#9676.

### How was this PR tested?

Ran on `525f8ce3fb` and on `main` at `89a492f97e` (Windows 11, Python
3.12 with CI's pinned `ruff` 0.14.7, `pytest` 9.0.3 and `textual` 8.2.8,
JDK 17):

```bash
cd amber
ruff check src/main/python src/test/python
ruff format --check src/main/python src/test/python
pytest -m "not integration"
cd ..
ruff check $(git diff --name-only origin/main -- '*.py' ':!amber/')
python -m pytest bin/ -v --tb=short
sbt "WorkflowCompilingService/testOnly org.apache.texera.amber.translator.verify.ComparatorSpec org.apache.texera.amber.translator.verify.HarnessSpec org.apache.texera.amber.translator.verify.PyOpExecHarnessSpec org.apache.texera.amber.translator.verify.VisualizationJsonComparatorSpec"
sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.huggingFace.codegen.HuggingFaceBinaryValueBehaviorSpec org.apache.texera.amber.operator.huggingFace.codegen.HuggingFaceParseBehaviorSpec org.apache.texera.amber.util.PythonCodeRawInvalidTextSpec"
```

- Ruff: passed on `amber/` (218 files already formatted) and on the 14
changed Python files outside `amber/`.
- `pytest -m "not integration"` in `amber/` (JUnit XML): each of the
1,524 tests has the same outcome as on `main`: 1,496 passed, 10 skipped,
and the same 18 platform-dependent tests (Iceberg catalog on PostgreSQL
and `s3fs`, time zones, object reprs) fail on this Windows machine on
both.
- `python -m pytest bin/` (JUnit XML): each of the 196 tests has the
same outcome as on `main`: 186 passed, and nine `bin/mounter` tests plus
`test_stamp_dir_for_matches_shell_sha1`, which assume POSIX paths and
shells, fail on Windows on both.
- sbt (JUnit XML, `UDF_PYTHON_PATH` set to Python 3.12 because Windows
has no `python3`): these seven suites load the edited test resources.
`WorkflowCompilingService` passed 52 of 52 in 4 suites and
`WorkflowOperator` 11 of 11 in 3 suites, with 0 canceled, the same as on
`main`.
- Licensing scripts: `concat_license_binary.py` writes byte-identical
combined licenses for the Python and frontend images, and
`check_binary_deps.py jar` prints byte-identical reports and exit codes
for a synthetic lib folder with missing, extra and version-mismatched
jars, with and without `--ignore-transitive-version`.
- Workflows: the three edited workflows run only from the default branch
(`issue_comment`, `pull_request_target` and `workflow_run`), so this
PR's CI cannot run them. Each edited `github-script` body ran before and
after under Node with recording stubs for `github`, `core`, `fs` and
`fetch`, over 496 fixtures (missing or malformed CSV and baseline data,
failed API calls, body edits with and without closing references). Every
API call, comment body and log line is identical, and a one-line change
to each script does show up in its traces. The `comment-commands.yml`
conditions differ from `main` only by the two removed checks.
- `bash -n` passes on `bin/fix-format.sh` and
`bin/frontend-proto-gen.sh`, and the edited YAML, TOML and JSON files
parse.
- After review, `f84888ca6c` changes only three docstrings in
`large_binary_output_stream.py` and inlines one local in
`py_op_driver.py`. On it, Ruff passes as above, each of the 1,524
`amber` tests again has the same outcome as on `main`, the four
`WorkflowCompilingService` suites pass 52 of 52, and `_jsonify` returns
the same strings as on `525f8ce3fb` for seven `BINARY` inputs, with and
without the pickle marker.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci changes related to CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show benchmark comparison against main baseline in PRs

4 participants