Skip to content

feat: Extends performance domain with measurement skills - #169

Open
MajorLift wants to merge 6 commits into
mainfrom
jongsun/add/performance-metrics
Open

MajorLift wants to merge 6 commits into
mainfrom
jongsun/add/performance-metrics

Conversation

@MajorLift

@MajorLift MajorLift commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Motivation

The performance domain's extension skills (perf-rendering, perf-hooks-effects, perf-react-compiler, perf-state-management) say what to change for React rendering, and none of them gives a method for measuring whether a change worked. A useMemo that recomputes on every render still looks correct in review, and only a re-render count separates it from one that works.

Overview

Extends the performance domain with three measurement skills and one knowledge file.

  • extension-profiling compares metamask-extension performance between branches using why-did-you-render, the React DevTools Profiler and E2E benchmarks.
  • react-render-delta tests whether a rendering or memoization change reduced work, from re-render counts and reselect's .recomputations(), and aborts any arm whose change did not reach the built bundle.
  • data-analysis attributes metric movements to the code changes in a release, and rates each attribution High, Medium or Low confidence.
  • domains/performance/knowledge/web-vitals-attribution-import.md: web-vitals/attribution, an import path within the web-vitals package, reports which script or element caused each metric, and the file says not to skip it for bundle size.

`extension-profiling`, `react-render-delta`, `data-analysis` and
`benchmark-design`, split from #43 so the audit half reviews separately.

The existing `performance` skill is mobile-scoped and advisory — it says what
to change. Nothing in the repo says how to prove a change worked, and the
extension has no profiling skill at all.
`yarn build:test` runs webpack with `--mode production`, which sets
`NODE_ENV=production`, and React's production build records no profiling
data. The statistics example labeled two non-significant results "no
effect", which an underpowered run and a true null cannot tell apart.
`benchmark-design`, `benchmark-statistical-hygiene`,
`metrics-pipeline-design` and the two benchmark-facing Web Vitals files
now ship in #162 (add E2E benchmark design and statistics
skills). This PR keeps profiling, render-delta proof and data analysis.
…nits

Choosing the round with the cleanest signal after seeing the data is
cherry-picking a time range, so per-round results are sensitivity. A
Cohen's d cutoff sets meaningfulness from the benchmark's own spread, so
the difference worth acting on is fixed from product impact instead.
A percentile is not a cohort, and an outcome read without the fraction of
users on a build that contains the change is not valid. Each change is
confirmed in the release whose traffic is read, with pre- and post-change
clients kept apart. A PR's baseline is its merge-base, and a profiling
run names the wallet state it ran on.
@MajorLift
MajorLift marked this pull request as ready for review September 18, 2026 14:25
@MajorLift
MajorLift requested a review from rvelaz September 18, 2026 14:47
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.

2 participants