Skip to content

Commit 69908ee

Browse files
boneskullclaude
andcommitted
docs(budgets): fix specificity scoring table and duplicate key in example
- Update specificity scoring table to match actual implementation: - Exact file: +2 (was +3) - Glob with specific parts: +1 (was +2 for partial, +1 for full) - Suite: +1 (was +2) - Full glob/wildcard: +0 - Fix duplicate 'Authentication' key in JSON example that would cause first entry to be silently overwritten - Update example calculations to reflect correct scoring (max 4 pts) Addresses PR #201 review comments from @copilot-pull-request-reviewer 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent e9b0df2 commit 69908ee

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

site/src/content/docs/guides/performance-budgets.mdx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,7 @@ Combine wildcards with exact matches for fine-grained control:
227227
"Authentication": {
228228
"*": {
229229
"relative": { "maxRegression": "10%" }
230-
}
231-
},
232-
"Authentication": {
230+
},
233231
"login": {
234232
"absolute": { "maxTime": "50ms" },
235233
"relative": { "maxRegression": "5%" }
@@ -252,10 +250,10 @@ When multiple patterns match a task, the **most specific** pattern wins:
252250

253251
| Pattern Component | Points |
254252
|-------------------|--------|
255-
| Exact file name | +3 |
256-
| Partial glob (e.g., `benchmarks/*.js`) | +2 |
257-
| Full glob (`**/*.js`) | +1 |
258-
| Exact suite name | +2 |
253+
| Exact file name | +2 |
254+
| Glob with specific parts (e.g., `**/api/**/*.bench.js`) | +1 |
255+
| Full glob (`**/*` or `*`) | +0 |
256+
| Exact suite name | +1 |
259257
| Exact task name | +1 |
260258
| Wildcard (`*`) | +0 |
261259

@@ -266,9 +264,9 @@ For task `api.bench.js/Authentication/login`:
266264
| Pattern | Specificity | Result |
267265
|---------|-------------|--------|
268266
| `**/*.bench.js/*/*` | 1 | Lowest priority |
269-
| `api.bench.js/*/*` | 3 | Medium priority |
270-
| `api.bench.js/Authentication/*` | 5 | Higher priority |
271-
| `api.bench.js/Authentication/login` | 6 | **Wins** |
267+
| `api.bench.js/*/*` | 2 | Medium priority |
268+
| `api.bench.js/Authentication/*` | 3 | Higher priority |
269+
| `api.bench.js/Authentication/login` | 4 | **Wins** |
272270

273271
When patterns have equal specificity, the budgets are **merged**, with later definitions overriding earlier ones.
274272

0 commit comments

Comments
 (0)