Adds the measurement at the first unit's decision gate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 21:03:08 +01:00
co-authored by Claude Opus 5.5
parent 8dc120e78c
commit a1d5c1ea4b
5 changed files with 257 additions and 3 deletions
@@ -0,0 +1,158 @@
# Measurement gate, raw results (Step 34, BR-MEA-02 to 05)
Raw numbers as measured. Medians of three runs per URL (summarize-lhr.mjs, same script as the baseline). Baseline values are in measurement-baseline.md. Columns: score, FCP ms, LCP ms, TBT ms, CLS, script transfer bytes (sum of `transferSize` of Script requests).
## Method and environment
- Worktree: `K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-prerendering`, HEAD `8dc120e78ccff5e5567bcf9ffb2065d2909f56be`. Commands run from `web/`.
- Build A: `pnpm build` (exit 0; prerender 12 pages incl. `/404`; runner: 12 pages checked, 16 scripts moved, 28 files written).
- Collection: `pnpm exec lhci collect --config=lighthouserc.cjs --numberOfRuns=3` (mobile) and `--config=lighthouserc.desktop.cjs --numberOfRuns=3` (desktop). Both exit 0, no page errors in the logs. The not-found URL is `/404.html` (`notFoundPath` in lighthouserc.cjs); the other 11 URLs are those of the baseline.
- Build B: temporary change in `web/src/hooks/useReveal.ts` (`return { ref, visible: inView || true };`), built and measured, then restored (see checksum section). Labelled as an indication (BR-MEA-05).
- Machine: same as baseline (Windows 11 Pro 10.0.26200, Git Bash, Node v24.16.0, pnpm 12.11.2). Port 4173 free before each run. CPU load 0% before the run.
## Run times (local time, 2026-10-31)
| Run | Start | End | Duration |
|---|---|---|---|
| Build A | not timed separately (12 s wall time in the build log) | | |
| A mobile | 20:29:56 | 20:37:41 | 7 min 45 s |
| A desktop | 20:37:41 | 20:45:28 | 7 min 47 s |
| Build B | 20:46 (about 20:46:26 start of lhci) | | |
| B mobile | 20:46:26 | 20:54:03 | 7 min 37 s |
| B desktop | 20:54:03 | 21:01:48 | 7 min 45 s |
| Restore rebuild | after 21:01:48 | | (exit 0) |
## A (the unit as it is), mobile
| URL | score | FCP ms | LCP ms | TBT ms | CLS | script transfer bytes |
|---|---|---|---|---|---|---|
| / | 0.85 | 1357.92 | 4280.28 | 66.5 | 0.001233 | 221110 |
| /over-mij | 0.90 | 1357.20 | 3608.40 | 65 | 0.000173 | 209938 |
| /portfolio | 0.94 | 1357.94 | 3006.62 | 64 | 0.001150 | 211655 |
| /soorten-fotoshoots | 0.89 | 1357.14 | 3683.33 | 62.5 | 0.006984 | 211671 |
| /soorten-fotoshoots/newborn | 0.90 | 1358.40 | 3609.81 | 64.5 | 0.020520 | 220648 |
| /soorten-fotoshoots/zwangerschap | 0.88 | 1357.40 | 3833.63 | 62 | 0.005578 | 220135 |
| /soorten-fotoshoots/gezin | 0.88 | 1357.20 | 3908.40 | 61 | 0.002290 | 220030 |
| /soorten-fotoshoots/loveshoot | 0.86 | 1357.15 | 4133.34 | 61 | 0.002135 | 220055 |
| /soorten-fotoshoots/portret | 0.89 | 1357.57 | 3758.83 | 64.5 | 0.002417 | 219995 |
| /contact | 0.94 | 1357.06 | 3007.06 | 63.5 | 0.001206 | 224665 |
| /privacyverklaring | 0.96 | 1206.56 | 2630.47 | 65.5 | 0.000825 | 203499 |
| /404.html | 0.97 | 1207.71 | 2556.43 | 61.5 | 0.000935 | 201270 |
## A, desktop
| URL | score | FCP ms | LCP ms | TBT ms | CLS | script transfer bytes |
|---|---|---|---|---|---|---|
| / | 0.99 | 368.76 | 865.84 | 0 | 0.000869 | 221110 |
| /over-mij | 1.00 | 368.01 | 751.90 | 0 | 0.001534 | 209938 |
| /portfolio | 0.99 | 367.21 | 887.21 | 0 | 0.001378 | 211655 |
| /soorten-fotoshoots | 1.00 | 367.45 | 768.69 | 0 | 0.012475 | 211671 |
| /soorten-fotoshoots/newborn | 1.00 | 367.31 | 808.53 | 0 | 0.002265 | 220648 |
| /soorten-fotoshoots/zwangerschap | 1.00 | 367.29 | 808.51 | 0 | 0.002033 | 220135 |
| /soorten-fotoshoots/gezin | 1.00 | 366.53 | 808.43 | 0 | 0.002011 | 220030 |
| /soorten-fotoshoots/loveshoot | 0.99 | 367.29 | 849.76 | 0 | 0.002030 | 220055 |
| /soorten-fotoshoots/portret | 1.00 | 366.54 | 807.63 | 0 | 0.001606 | 219995 |
| /contact | 1.00 | 366.77 | 727.90 | 0 | 0.001945 | 224665 |
| /privacyverklaring | 1.00 | 327.59 | 586.32 | 0 | 0.001725 | 203499 |
| /404.html | 1.00 | 327.29 | 589.30 | 0 | 0.001172 | 201270 |
## B (Reveal forced visible, indication only), mobile
| URL | score | FCP ms | LCP ms | TBT ms | CLS | script transfer bytes |
|---|---|---|---|---|---|---|
| / | 0.85 | 1358.55 | 4280.70 | 67.5 | 0.001233 | 221102 |
| /over-mij | 0.92 | 1357.56 | 3306.30 | 61 | 0.001784 | 209938 |
| /portfolio | 0.90 | 1357.91 | 3607.01 | 61.5 | 0.001943 | 211651 |
| /soorten-fotoshoots | 0.92 | 1358.06 | 3383.06 | 64 | 0.009305 | 211666 |
| /soorten-fotoshoots/newborn | 0.91 | 1357.16 | 3457.16 | 60.5 | 0.020520 | 220642 |
| /soorten-fotoshoots/zwangerschap | 0.89 | 1357.27 | 3682.27 | 64.5 | 0.005578 | 220131 |
| /soorten-fotoshoots/gezin | 0.89 | 1357.58 | 3757.58 | 60 | 0.002290 | 220024 |
| /soorten-fotoshoots/loveshoot | 0.88 | 1357.38 | 3907.38 | 62 | 0.002135 | 220048 |
| /soorten-fotoshoots/portret | 0.89 | 1357.07 | 3682.07 | 63.5 | 0.001864 | 219988 |
| /contact | 0.94 | 1356.42 | 3006.13 | 61.5 | 0.001206 | 224651 |
| /privacyverklaring | 0.97 | 1206.70 | 2630.35 | 60 | 0.000825 | 203488 |
| /404.html | 0.97 | 1206.99 | 2555.82 | 60.5 | 0.000935 | 201265 |
## B, desktop
| URL | score | FCP ms | LCP ms | TBT ms | CLS | script transfer bytes |
|---|---|---|---|---|---|---|
| / | 0.99 | 369.02 | 866.01 | 0 | 0.000974 | 221102 |
| /over-mij | 1.00 | 367.62 | 727.62 | 0 | 0.002586 | 209938 |
| /portfolio | 0.99 | 366.83 | 950.46 | 0 | 0.004266 | 211651 |
| /soorten-fotoshoots | 1.00 | 367.12 | 727.12 | 0 | 0.013004 | 211666 |
| /soorten-fotoshoots/newborn | 1.00 | 366.92 | 766.85 | 0 | 0.003065 | 220642 |
| /soorten-fotoshoots/zwangerschap | 1.00 | 367.64 | 786.86 | 0 | 0.002026 | 220131 |
| /soorten-fotoshoots/gezin | 1.00 | 367.43 | 787.43 | 0 | 0.003122 | 220024 |
| /soorten-fotoshoots/loveshoot | 1.00 | 366.74 | 806.74 | 0 | 0.002547 | 220048 |
| /soorten-fotoshoots/portret | 1.00 | 366.83 | 786.83 | 0 | 0.002379 | 219988 |
| /contact | 1.00 | 367.13 | 728.31 | 0 | 0.002692 | 224651 |
| /privacyverklaring | 1.00 | 327.51 | 586.26 | 0 | 0.001725 | 203488 |
| /404.html | 1.00 | 326.85 | 586.85 | 0 | 0.001031 | 201265 |
## CLS (BR-MEA-04, must stay below 0.01)
| Page | Mobile A | Mobile B | Desktop A | Desktop B | Result |
|---|---|---|---|---|---|
| / | 0.001233 | 0.001233 | 0.000869 | 0.000974 | below 0.01 |
| /contact | 0.001206 | 0.001206 | 0.001945 | 0.002692 | below 0.01 |
Result: passes on both pages, both devices, in A and B. No placeholder shift was observed.
## Moved scripts timing (BR-MEA-03), one mobile LHR per run
The LHR `network-requests` items in this Lighthouse version have `networkRequestTime` and `networkEndTime` but no `startTime`/`endTime`; values below are those fields, in ms as stored in the LHR.
| Page | Run | Moved file | networkRequestTime ms | networkEndTime ms | FCP ms | LCP ms |
|---|---|---|---|---|---|---|
| / | 1 | inline-cc530bf8011d.js | 19.38 | 25.78 | 1361 | 4283 |
| / | 1 | inline-fcb256842f30.js | 19.46 | 25.69 | 1361 | 4283 |
| / | 1 | inline-444913437999.js | 23.58 | 27.59 | 1361 | 4283 |
| / | 2 | inline-cc530bf8011d.js | 36.88 | 41.44 | 1358 | 4280 |
| / | 2 | inline-fcb256842f30.js | 36.97 | 41.07 | 1358 | 4280 |
| / | 2 | inline-444913437999.js | 39.29 | 44.18 | 1358 | 4280 |
| / | 3 | inline-cc530bf8011d.js | 15.28 | 20.04 | 1357 | 4280 |
| / | 3 | inline-fcb256842f30.js | 15.43 | 20.38 | 1357 | 4280 |
| / | 3 | inline-444913437999.js | 18.09 | 22.72 | 1357 | 4280 |
| /over-mij | 1 | inline-cc530bf8011d.js | 15.61 | 20.71 | 1357 | 3608 |
| /over-mij | 1 | inline-583231f49d39.js | 15.69 | 21.38 | 1357 | 3608 |
| /over-mij | 1 | inline-444913437999.js | 17.65 | 21.47 | 1357 | 3608 |
| /over-mij | 2 | inline-cc530bf8011d.js | 16.08 | 20.28 | 1357 | 3608 |
| /over-mij | 2 | inline-583231f49d39.js | 16.15 | 20.50 | 1357 | 3608 |
| /over-mij | 2 | inline-444913437999.js | 16.26 | 21.52 | 1357 | 3608 |
| /over-mij | 3 | inline-cc530bf8011d.js | 16.20 | 22.72 | 1359 | 3610 |
| /over-mij | 3 | inline-583231f49d39.js | 16.29 | 24.02 | 1359 | 3610 |
| /over-mij | 3 | inline-444913437999.js | 18.81 | 24.99 | 1359 | 3610 |
Reading: on both pages all moved scripts finish within about 45 ms, long before FCP (about 1.36 s) and LCP (about 3.6 s on `/over-mij`, about 4.3 s on `/`).
## Gzip sizes and moved scripts (A build, `dist/client`)
Entry JavaScript (`dist/client/index.html`): 19 files, gzip total 206550 bytes; of these, 3 are moved inline files (gzip 1200 bytes) and 16 other files (205350 bytes).
All JavaScript (`dist/client/assets/*.js`): 54 files, gzip total 305234 bytes; of these 16 are moved inline files (gzip 9531 bytes).
Baseline (master, for comparison): entry JavaScript 11 files, gzip 181161 bytes; all JavaScript 42 files, gzip 284705 bytes.
Moved scripts per page (from `gzip-moved.mjs`, full output in the scratch folder):
page file | moved files | moved gzip bytes
404.html | 3 | 1048
contact.html | 5 | 1707
index.html | 3 | 1200
over-mij.html | 3 | 1156
portfolio.html | 3 | 1144
privacyverklaring.html | 3 | 1096
soorten-fotoshoots.html | 3 | 1178
soorten-fotoshoots/gezin.html | 3 | 1238
soorten-fotoshoots/loveshoot.html | 3 | 1237
soorten-fotoshoots/newborn.html | 3 | 1238
soorten-fotoshoots/portret.html | 3 | 1238
soorten-fotoshoots/zwangerschap.html | 3 | 1243
## Git status and checksum
- status-before.txt (pre-change, empty): matches status-after.txt and status-final.txt (empty).
- web/src/hooks/useReveal.ts SHA-256 before and after restore: 015643dca17cc45ac6844b640919b07c81f9149be1b0c9964cd2d044aaadf795 (match).
- No git add, commit or stash was run.
- Final rebuild after restore: pnpm build exit 0, 12 pages, 16 scripts moved.
@@ -0,0 +1,84 @@
# Measurement at the Decision Gate - Unit 1
Compares master (c4c2f83, see [measurement-baseline.md](measurement-baseline.md)) with unit 1 (8dc120e). Requirements: NFR-PR-P-03, P-04, Q-04; rules BR-MEA-02 to 05.
**Method**: `lhci collect`, 3 runs per URL, median, same PC, Node 24.16.0 and summary script. Measured on 2026-10-31.
**Differences in setup**:
- Baseline ran on `vite preview`, unit 1 on `config/previewServer.ts`. Both compress text responses.
- The not-found URL is `/bestaat-niet` in the baseline and `/404.html` in A and B, because Lighthouse refuses a page with status 404.
- **B** forces `Reveal` visible through a temporary, uncommitted change to `useReveal.ts`. It is only an indication of unit 2 (BR-MEA-05). It has no photo preload and is not unit 2's real behaviour.
## Mobile
| URL | Score base | Score A | Score B | FCP base | FCP A | LCP base | LCP A | LCP B | TBT base | TBT A | CLS base | CLS A |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| `/` | 0.75 | 0.85 | 0.85 | 2595 | 1358 | 4293 | 4280 | 4281 | 293 | 67 | 0.0011 | 0.0012 |
| `/over-mij` | 0.86 | 0.90 | 0.92 | 2597 | 1357 | 3535 | 3608 | 3306 | 132 | 65 | 0.0002 | 0.0002 |
| `/portfolio` | 0.90 | 0.94 | 0.90 | 2517 | 1358 | 2926 | 3007 | 3607 | 126 | 64 | 0.0012 | 0.0012 |
| `/soorten-fotoshoots` | 0.85 | 0.89 | 0.92 | 2592 | 1357 | 3750 | 3683 | 3383 | 127 | 63 | 0.0070 | 0.0070 |
| `.../newborn` | 0.85 | 0.90 | 0.91 | 2591 | 1358 | 3525 | 3610 | 3457 | 151 | 65 | 0.0205 | 0.0205 |
| `.../zwangerschap` | 0.84 | 0.88 | 0.89 | 2591 | 1357 | 3676 | 3834 | 3682 | 142 | 62 | 0.0056 | 0.0056 |
| `.../gezin` | 0.84 | 0.88 | 0.89 | 2592 | 1357 | 3678 | 3908 | 3758 | 148 | 61 | 0.0023 | 0.0023 |
| `.../loveshoot` | 0.82 | 0.86 | 0.88 | 2590 | 1357 | 3768 | 4133 | 3907 | 188 | 61 | 0.0021 | 0.0021 |
| `.../portret` | 0.84 | 0.89 | 0.89 | 2590 | 1358 | 3673 | 3759 | 3682 | 140 | 65 | 0.0024 | 0.0024 |
| `/contact` | 0.87 | 0.94 | 0.94 | 2725 | 1357 | 3345 | 3007 | 3006 | 114 | 64 | 0.0009 | 0.0012 |
| `/privacyverklaring` | 0.90 | 0.96 | 0.97 | 2513 | 1207 | 2844 | 2630 | 2630 | 164 | 66 | 0.0011 | 0.0008 |
| Not found | 0.91 | 0.97 | 0.97 | 2406 | 1208 | 2603 | 2556 | 2556 | 171 | 62 | 0.0014 | 0.0009 |
Times in ms.
Reading of base against A:
- **Score**: better on all 12 URLs.
- **FCP and TBT**: better on all 12 URLs. FCP drops from about 2.6 s to 1.36 s; TBT roughly halves or better.
- **LCP**: better on 6 URLs (`/`, by 13 ms, `/soorten-fotoshoots`, `/contact`, `/privacyverklaring`, not found) and worse on 7: `/over-mij` +73, `/portfolio` +81, newborn +85, zwangerschap +158, gezin +230, loveshoot +365, portret +86.
- **Against 0.9**: six URLs reach it in A (`/over-mij`, `/portfolio`, newborn, `/contact`, `/privacyverklaring`, not found). Below 0.9: `/`, `/soorten-fotoshoots`, zwangerschap, gezin, loveshoot, portret.
## Desktop
| URL | Score base | Score A | Score B | FCP base | FCP A | LCP base | LCP A |
|---|---|---|---|---|---|---|---|
| `/` | 0.99 | 0.99 | 0.99 | 579 | 369 | 915 | 866 |
| `/over-mij` | 0.99 | 1.00 | 1.00 | 579 | 368 | 770 | 752 |
| `/portfolio` | 0.99 | 0.99 | 0.99 | 557 | 367 | 868 | 887 |
| `/soorten-fotoshoots` | 0.99 | 1.00 | 1.00 | 578 | 367 | 770 | 769 |
| `.../newborn` | 0.99 | 1.00 | 1.00 | 577 | 367 | 748 | 809 |
| `.../zwangerschap` | 0.99 | 1.00 | 1.00 | 577 | 367 | 769 | 809 |
| `.../gezin` | 0.99 | 1.00 | 1.00 | 577 | 367 | 768 | 808 |
| `.../loveshoot` | 0.99 | 0.99 | 1.00 | 577 | 367 | 767 | 850 |
| `.../portret` | 0.99 | 1.00 | 1.00 | 577 | 367 | 767 | 808 |
| `/contact` | 0.99 | 1.00 | 1.00 | 592 | 367 | 783 | 728 |
| `/privacyverklaring` | 1.00 | 1.00 | 1.00 | 553 | 328 | 641 | 586 |
| Not found | 1.00 | 1.00 | 1.00 | 525 | 327 | 577 | 589 |
Scores are equal or better; FCP is better everywhere. LCP is at most 83 ms worse, on loveshoot.
## JavaScript
| Measure (gzip) | Base | A | Difference |
|---|---|---|---|
| Entry JavaScript on `/` | 181,161 bytes | 206,550 bytes | +25,389 bytes (+14%) |
| All JavaScript | 284,705 bytes | 305,234 bytes | +20,529 bytes (+7%) |
| Moved inline scripts, all 16 files | none | 9,531 bytes | Included in all JavaScript |
Script transfer on mobile rises by about 7 to 10 kB per page, for example `/` from 214 kB to 221 kB and `/over-mij` from 202 kB to 210 kB.
## Moved scripts (BR-MEA-03)
Three per page, five on `/contact`. Single mobile runs of `/` and `/over-mij` show them finished at about 20 to 45 ms of observed time, before FCP (about 1357 ms) and LCP. No sign of delayed first paint, and FCP is better than the baseline on every page (NFR-PR-P-04).
## CLS (BR-MEA-04, V10)
Below 0.01 on `/` and `/contact`, mobile and desktop (`/` 0.0012 and 0.0009; `/contact` 0.0012 and 0.0019). The e-mail placeholders pass.
Outside this rule, the existing values on newborn (0.0205 mobile) and `/soorten-fotoshoots` (0.0125 desktop) equal the baseline.
## Not found page
`/404.html` scores 0.97 and 1.00 and gave no errors in the Lighthouse logs. Whether the Lighthouse assertions on best practices pass follows from `pnpm lighthouse`, which `collect` does not assert.
## State after the measurement
`useReveal.ts` restored and checksum verified (015643dc...), `git status` clean, `dist` rebuilt from the committed code.