Skip to content

⚡️ perf: add protocol and session CodSpeed hot-path benches - #406

Merged
zrr1999 merged 2 commits into
ci/workflow-lanesfrom
perf/codspeed-hotspots
Aug 17, 2026
Merged

zrr1999 merged 2 commits into
ci/workflow-lanesfrom
perf/codspeed-hotspots

Conversation

@zrr1999

@zrr1999 zrr1999 commented Aug 17, 2026 •

Copy link
Copy Markdown
Collaborator

动机

CodSpeed currently measures Lens production paths only. Protocol parse/project/A2UI/trace and session snapshot index/tail are hotter and cheaper to pin as advisory benches.

解决方案

Add protocol and session CodSpeed cases (500-message parse/project, 500-component A2UI, 247-span traces, 10k snapshot index/tail) to the existing advisory Lens Production Paths job. Correctness tests reuse the *-cases.ts fixtures.

说明

Stacked on #405 (ci/workflow-lanes). Benchmarks stay advisory; they are not a merge gate. The job still uses Node 24 only for CodSpeed's Linux addon.

@codspeed

codspeed Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 3 untouched benchmarks
🆕 6 new benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 normalizeSparkA2uiDocument: 500 components N/A 24.2 ms N/A
🆕 parseSparkSessionView: 500 messages N/A 15.8 ms N/A
🆕 projectSparkConversationMessage: 500 parts N/A 6.1 ms N/A
🆕 validateCompletedSparkAgentTrace: 247 tool spans N/A 3.9 ms N/A
🆕 loadSparkSessionSnapshotTail: 10000→32 index-hit N/A 20.1 ms N/A
🆕 refreshSparkSessionSnapshotIndex: 10000 entries N/A 1.3 s N/A

Comparing perf/codspeed-hotspots (d71f44c) with ci/workflow-lanes (6460420)

Open in CodSpeed

Cover parse/project/normalize/trace and snapshot index/tail workloads in the existing Lens CodSpeed job.

Co-authored-by: Cursor <cursoragent@cursor.com>
@zrr1999
zrr1999 force-pushed the perf/codspeed-hotspots branch from 309924a to e27d14b Compare August 17, 2026 09:14
CI1 removed the spark-node-setup composite; this layer still called it, so Lens Production Paths failed on checkout.

Co-authored-by: Cursor <cursoragent@cursor.com>
@zrr1999
zrr1999 merged commit 4352a07 into main Aug 17, 2026
24 of 25 checks passed
@zrr1999
zrr1999 deleted the perf/codspeed-hotspots branch August 17, 2026 12:23
zrr1999 added a commit that referenced this pull request Aug 17, 2026
## 动机

Merge-gate jobs already live in two workflow files. Fine-grained per-job
workflows and a shared Node composite added indirection without new
policy: `needs` only works inside one workflow.

## 解决方案

Keep similar jobs in the existing files and add intra-lane `needs`:

- `ci-static-checks.yml`: `Pre-commit Checks` → `Project Checks` and
`Documentation Checks`
- `ci-tests.yml`: `Source Tests` → `Process Tests`, `Repro Golden
Journey (Ubuntu)`, and `Browser Tests`

Setup stays inline. `ce-behavior.yml` stays one job. Do not rename
`cd-publish.yml`. Job `name:` strings stay stable. There is still no
static-to-runtime `needs` chain.

## 说明

Stacked under [stack
#407](https://github.com/zendev-lab/spark/stack/407). This layer targets
`main`.

## 后续工作

CodSpeed protocol/session hot-path benches land in #406.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
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