-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbudget.json
More file actions
72 lines (72 loc) · 2.41 KB
/
budget.json
File metadata and controls
72 lines (72 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
[
{
"path": "/*",
"comment": "Performance budgets for riksdagsmonitor. The source styles.css is kept lean by hand (no PurgeCSS in the pipeline — see deploy-s3.yml), then the deploy minify step (scripts/minify-dist.ts) shrinks HTML/CSS/JS in dist/. These budgets reserve mobile-throttled headroom so a regression > ~25% above measured baseline fails CI.",
"timings": [
{
"metric": "first-contentful-paint",
"budget": 3000,
"comment": "Desktop baseline (post-optimisation): 1.1s. Mobile-throttled headroom budget: 3000ms."
},
{
"metric": "largest-contentful-paint",
"budget": 3500,
"comment": "Desktop baseline (post-optimisation): 1.1s. Mobile-throttled headroom budget: 3500ms."
},
{
"metric": "interactive",
"budget": 3800,
"comment": "Aligned with Google's TTI 'fast' band (< 3.8s mobile)."
},
{
"metric": "cumulative-layout-shift",
"budget": 0.1,
"comment": "Target: < 0.1 (Core Web Vitals 'good'); measured 0.007 desktop."
},
{
"metric": "total-blocking-time",
"budget": 200,
"comment": "Target: < 200ms; measured 0ms desktop."
}
],
"resourceSizes": [
{
"resourceType": "document",
"budget": 70,
"comment": "Pre-minify baseline 92 KiB. Post HTML minify: ≤ 70 KiB target."
},
{
"resourceType": "script",
"budget": 250,
"comment": "Post-minify target. esbuild already drops console/debugger; scripts/minify-dist.ts squeezes the residue."
},
{
"resourceType": "stylesheet",
"budget": 80,
"comment": "Stylesheet budget: source styles.css kept lean by hand, then minified at deploy. Target ≤ 80 KiB raw / ≤ 25 KiB gzip on the wire."
},
{
"resourceType": "image",
"budget": 500,
"comment": "Unchanged — image optimisation not in scope of this PR."
},
{
"resourceType": "font",
"budget": 100,
"comment": "Unchanged — already passing."
},
{
"resourceType": "total",
"budget": 900,
"comment": "Tightened after CSS source clean-up + JS/CSS/HTML minify."
}
],
"resourceCounts": [
{
"resourceType": "third-party",
"budget": 10,
"comment": "No failures reported, maintaining current budget"
}
]
}
]