Skip to content

Add full-chain (100k block) import stats to the perf graph#119

Merged
tomusdrw merged 2 commits into
mainfrom
td-perf-stats-100k-imports
Jul 13, 2026
Merged

Add full-chain (100k block) import stats to the perf graph#119
tomusdrw merged 2 commits into
mainfrom
td-perf-stats-100k-imports

Conversation

@tomusdrw

Copy link
Copy Markdown
Member

What

Adds the picofuzz full-chain (100k-block) import stats to the performance stats page ("typeberry import stats"), as a dedicated chart alongside the existing per-scenario ones (conformance, fallback, safrole, storage, storage_light).

The Picofuzz Full Chain workflow already emits full_chain.csv in the exact same 19-column stats format as the other charts, but its artifact lives in a separate workflow that never triggers the deploy — so it was never rendered. This wires it in.

Changes

Frontend (perf-graph/)

  • Chart.tsx — optional title prop; heading renders title ?? name (existing charts unchanged).
  • App.tsx — new dedicated section: <Chart name="full_chain" title="Full chain import (100k blocks)" />.
  • App.css.full-chain-section spacing (mirrors .conformance-section).

Seed data

  • perf-graph/public/full_chain.csv — 10-row accumulated history from the latest picofuzz-csv-full_chain artifact (v0.9.x–v0.11.x, count=100051). Artifacts retain only 90 days, so the repo copy is the long-term base the deploy merges onto — same pattern as the other committed CSVs.

Deploy wiring (deploy-perf-graph.yml)

  • Trigger on "Picofuzz Full Chain" too → same-day redeploy when a fresh result lands.
  • Added actions: read permission.
  • New step resolves that workflow's latest successful run via the API and downloads its picofuzz-csv-full_chain artifact into ./csv-artifacts/, regardless of trigger, so the chart stays fresh on every deploy. merge-csvs.ts globs it automatically — no merge-script change. Both downloads are continue-on-error, mirroring the existing step.

Verification

  • npm run build (perf-graph) passes; full_chain.csv is served in dist/.
  • npm run lint (eslint) clean; biome check on changed source files clean.
  • Merge script dry-run with a simulated artifact: loaded 10, added 1 new, skipped 10 dups, wrote 11, new row date-sorted to the end.
  • Workflow YAML validated.

Notes

  • The API-fetch step only truly exercises on CI (faithful mirror of the existing Get previous run ID pattern in picofuzz.yml; same ARTIFACTS_PAT). First deploy after merge is the real proof.
  • docs/superpowers/specs/2026-07-13-full-chain-perf-graph-design.md (design doc) is included for context — happy to drop it if you'd rather not track it.

🤖 Generated with Claude Code

The Picofuzz Full Chain workflow already emits full_chain.csv in the same
stats format as the other charts, but its artifact lives in a separate
workflow that never triggers the deploy, so it was never shown on the page.

- perf-graph: render a dedicated "Full chain import (100k blocks)" chart;
  add an optional `title` prop to Chart (existing charts unchanged).
- Seed perf-graph/public/full_chain.csv with the accumulated history
  (artifacts retain only 90 days; the repo copy is the long-term base).
- deploy-perf-graph.yml: also trigger on "Picofuzz Full Chain", and always
  fetch that workflow's latest successful picofuzz-csv-full_chain artifact
  so the chart stays fresh regardless of what triggered the deploy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 62619ec1-07df-45cb-9abc-8e67839a5882

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The perf graph adds a titled full-chain import chart and deployment support for retrieving full_chain.csv from the latest successful full-chain workflow run.

Changes

Full-chain performance graph

Layer / File(s) Summary
Full-chain chart rendering
perf-graph/src/components/Chart.tsx, perf-graph/src/App.tsx, perf-graph/src/App.css
Chart supports optional titles, and the application renders a spaced “Full chain import (100k blocks)” chart using shared version state and callbacks.
Artifact deployment integration
.github/workflows/deploy-perf-graph.yml, docs/superpowers/specs/...
Deployment triggers on full-chain workflow completion, resolves the latest successful run through the GitHub Actions API, and downloads its picofuzz-csv-full_chain artifact for existing CSV processing. The design specifies seeded history and validation steps.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Workflow as deploy-perf-graph workflow
  participant API as GitHub Actions API
  participant Artifact as Picofuzz Full Chain artifact
  participant Graph as perf-graph
  Workflow->>API: Resolve latest successful full-chain run
  API-->>Workflow: Return run ID
  Workflow->>Artifact: Download picofuzz-csv-full_chain
  Artifact-->>Workflow: Provide full_chain.csv
  Workflow->>Graph: Include CSV in existing merge and deployment
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding full-chain import stats to the perf graph.
Description check ✅ Passed The description is directly related to the changes and explains the frontend, deploy, and seed-data updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch td-perf-stats-100k-imports

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/deploy-perf-graph.yml:
- Around line 65-75: Update the workflow step resolving WORKFLOW_ID and RUN_ID
to validate the curl HTTP responses and ensure both jq results are non-empty and
not null before writing run-id to GITHUB_OUTPUT. When resolution fails or no
successful run exists, explicitly fail the deployment or skip artifact download
with a warning, and prevent subsequent commands from continuing with seeded or
stale CSV data.

In `@docs/superpowers/specs/2026-07-13-full-chain-perf-graph-design.md`:
- Around line 12-14: Update the perf page CSV format description near the Chart
reference to state the correct 20-field total, or explicitly identify that the
count excludes projectName. Keep the listed field names and Chart.tsx parser
aligned so consumers retain every CSV field.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 348bcf45-d0b5-4e53-aeb3-1b0cc6f4de3b

📥 Commits

Reviewing files that changed from the base of the PR and between a2c1a43 and 49f4037.

⛔ Files ignored due to path filters (1)
  • perf-graph/public/full_chain.csv is excluded by !**/*.csv
📒 Files selected for processing (5)
  • .github/workflows/deploy-perf-graph.yml
  • docs/superpowers/specs/2026-07-13-full-chain-perf-graph-design.md
  • perf-graph/src/App.css
  • perf-graph/src/App.tsx
  • perf-graph/src/components/Chart.tsx

Comment thread .github/workflows/deploy-perf-graph.yml Outdated
Comment thread docs/superpowers/specs/2026-07-13-full-chain-perf-graph-design.md Outdated
…lution

- spec: "19-column" -> "20-field" and expand p1..p99 to the full list; the
  tuple (projectName..p99) is 20 fields, matching the Chart.tsx parser.
- deploy-perf-graph.yml: validate the resolved Picofuzz Full Chain run id.
  `// empty` keeps a literal "null" out of the step output; on an unresolved
  or missing run the step now emits a ::warning:: and the download is skipped
  (guarded by a non-empty run-id) instead of attempting a `run-id: null`
  fetch. Kept deliberately non-fatal: the deploy still ships the other charts
  with the committed/seeded full_chain.csv rather than failing wholesale.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tomusdrw tomusdrw merged commit 4e92edd into main Jul 13, 2026
19 checks passed
@tomusdrw tomusdrw deleted the td-perf-stats-100k-imports branch July 13, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant