Page MenuHomePhabricator

Investigate Fresnel
Closed, ResolvedPublic

Description

@dom_walden suggested we pair on investigating Performance/Synthetic testing and Performance/Fresnel. We decided to spend some time with Fresnel.

We found a recent commit in core (760992) with fresnel job (50232).

We looked at trace in Chrome.

Screenshot 2022-02-10 at 18.17.45.png (1×1 px, 472 KB)

We ran the tests locally.

1~/Documents/gerrit/mediawiki/core$ fresnel compare "before" "after"
2
3
4### scenario Read a page
5|----------------------------------------------------------|---------------------|---------------------|---------|--|
6| Metric | Before | After | Diff | |
7|----------------------------------------------------------|---------------------|---------------------|---------|--|
8| navtiming: | | | | |
9| Time to first byte (responseStart) | 295 ms (± 37 ms) | 350 ms (± 87 ms) | 0 ms | |
10| Total page load time (loadEventEnd) | 1.300 s (± 66 ms) | 1.132 s (± 118 ms) | 0 ms | |
11| Time from responseEnd to domComplete (processing) | 708 ms (± 47 ms) | 781 ms (± 76 ms) | 0 ms | |
12| Time from loadEventStart to loadEventEnd (onLoad) | <0.1 ms (± <0.1 ms) | <0.1 ms (± <0.1 ms) | 0 ms | |
13| paint: | | | | |
14| Time to first paint (TTFP) | 627 ms (± 58 ms) | 731 ms (± 125 ms) | P 0.973 | |
15| Total to first contentful paint (TTFCP) | 627 ms (± 58 ms) | 731 ms (± 125 ms) | P 0.973 | |
16| transfer: | | | | |
17| Total size of transfers during page load (pageWeight) | 129 kB (± 15 B) | 129 kB (± 8 B) | 0 B | |
18| Transfer size of HTML document (html) | 5.1 kB (± <0.9 B) | 5.1 kB (± <0.8 B) | 0 B | |
19| Transfer size of CSS resources (css) | 7.9 kB (± 0 B) | 7.9 kB (± 0 B) | 0 B | |
20| Transfer size of JavaScript resources (js) | 86.9 kB (± 6 B) | 86.9 kB (± 4 B) | 0 B | |
21| Transfer size of Image document (img) | 28.9 kB (± 10 B) | 28.9 kB (± 8 B) | 0 B | |
22| Transfer size of other resources (other) | 0 B (± 0 B) | 0 B (± 0 B) | 0 B | |
23|----------------------------------------------------------|---------------------|---------------------|---------|--|
24
25
26### scenario Load the editor
27|----------------------------------------------------------|---------------------|---------------------|---------|--|
28| Metric | Before | After | Diff | |
29|----------------------------------------------------------|---------------------|---------------------|---------|--|
30| navtiming: | | | | |
31| Time to first byte (responseStart) | 385 ms (± 69 ms) | 350 ms (± 37 ms) | 0 ms | |
32| Total page load time (loadEventEnd) | 1.260 s (± 60 ms) | 1.194 s (± 54 ms) | 0 ms | |
33| Time from responseEnd to domComplete (processing) | 873 ms (± 71 ms) | 843 ms (± 35 ms) | 0 ms | |
34| Time from loadEventStart to loadEventEnd (onLoad) | <0.1 ms (± <0.1 ms) | <0.1 ms (± <0.1 ms) | 0 ms | |
35| paint: | | | | |
36| Time to first paint (TTFP) | 920 ms (± 54 ms) | 847 ms (± 62 ms) | P 0.015 | |
37| Total to first contentful paint (TTFCP) | 920 ms (± 54 ms) | 847 ms (± 62 ms) | P 0.015 | |
38| transfer: | | | | |
39| Total size of transfers during page load (pageWeight) | 186 kB (± 12 B) | 186 kB (± 12 B) | 0 B | |
40| Transfer size of HTML document (html) | 6.6 kB (± 1 B) | 6.6 kB (± 2 B) | 0 B | |
41| Transfer size of CSS resources (css) | 17.8 kB (± 0 B) | 17.8 kB (± 0 B) | 0 B | |
42| Transfer size of JavaScript resources (js) | 133 kB (± 5 B) | 133 kB (± 2 B) | 0 B | |
43| Transfer size of Image document (img) | 27.7 kB (± 11 B) | 27.7 kB (± 10 B) | 0 B | |
44| Transfer size of other resources (other) | 0 B (± 0 B) | 0 B (± 0 B) | 0 B | |
45|----------------------------------------------------------|---------------------|---------------------|---------|--|
46
47
48### scenario View history of a page
49|----------------------------------------------------------|---------------------|---------------------|---------|--|
50| Metric | Before | After | Diff | |
51|----------------------------------------------------------|---------------------|---------------------|---------|--|
52| navtiming: | | | | |
53| Time to first byte (responseStart) | 546 ms (± 369 ms) | 361 ms (± 52 ms) | 0 ms | |
54| Total page load time (loadEventEnd) | 2.800 s (± 550 ms) | 1.418 s (± 92 ms) | - 20 ms | |
55| Time from responseEnd to domComplete (processing) | 1.533 s (± 491 ms) | 1.510 s (± 65 ms) | 0 ms | |
56| Time from loadEventStart to loadEventEnd (onLoad) | <0.1 ms (± <0.1 ms) | <0.1 ms (± <0.1 ms) | 0 ms | |
57| paint: | | | | |
58| Time to first paint (TTFP) | 1.440 s (± 510 ms) | 966 ms (± 86 ms) | P 0.002 | |
59| Total to first contentful paint (TTFCP) | 1.440 s (± 510 ms) | 966 ms (± 86 ms) | P 0.002 | |
60| transfer: | | | | |
61| Total size of transfers during page load (pageWeight) | 242 kB (± 17 B) | 242 kB (± 11 B) | 0 B | |
62| Transfer size of HTML document (html) | 6.6 kB (± 2 B) | 6.6 kB (± 1 B) | 0 B | |
63| Transfer size of CSS resources (css) | 20.0 kB (± 0 B) | 20.0 kB (± 0 B) | 0 B | |
64| Transfer size of JavaScript resources (js) | 185 kB (± 7 B) | 185 kB (± 3 B) | 0 B | |
65| Transfer size of Image document (img) | 30.6 kB (± 11 B) | 30.6 kB (± 10 B) | 0 B | |
66| Transfer size of other resources (other) | 0 B (± 0 B) | 0 B (± 0 B) | 0 B | |
67|----------------------------------------------------------|---------------------|---------------------|---------|--|
68
69
70### scenario View recent changes
71|----------------------------------------------------------|---------------------|---------------------|---------|--|
72| Metric | Before | After | Diff | |
73|----------------------------------------------------------|---------------------|---------------------|---------|--|
74| navtiming: | | | | |
75| Time to first byte (responseStart) | 593 ms (± 145 ms) | 491 ms (± 41 ms) | 0 ms | |
76| Total page load time (loadEventEnd) | 2.426 s (± 361 ms) | 2.660 s (± 122 ms) | 0 ms | |
77| Time from responseEnd to domComplete (processing) | 1.829 s (± 230 ms) | 1.574 s (± 101 ms) | 0 ms | |
78| Time from loadEventStart to loadEventEnd (onLoad) | <0.1 ms (± <0.1 ms) | <0.1 ms (± <0.1 ms) | 0 ms | |
79| paint: | | | | |
80| Time to first paint (TTFP) | 1.154 s (± 231 ms) | 917 ms (± 84 ms) | P 0.005 | |
81| Total to first contentful paint (TTFCP) | 1.154 s (± 231 ms) | 917 ms (± 84 ms) | P 0.005 | |
82| transfer: | | | | |
83| Total size of transfers during page load (pageWeight) | 272 kB (± 21 B) | 272 kB (± 20 B) | 0 B | |
84| Transfer size of HTML document (html) | 10.0 kB (± <0.8 B) | 10.0 kB (± 1 B) | 0 B | |
85| Transfer size of CSS resources (css) | 9.7 kB (± 2 B) | 9.7 kB (± 0 B) | 0 B | |
86| Transfer size of JavaScript resources (js) | 221 kB (± 3 B) | 221 kB (± 6 B) | 0 B | |
87| Transfer size of Image document (img) | 30.6 kB (± 19 B) | 30.6 kB (± 16 B) | 0 B | |
88| Transfer size of other resources (other) | 0 B (± 0 B) | 0 B (± 0 B) | 0 B | |
89|----------------------------------------------------------|---------------------|---------------------|---------|--|

Links:

TODO

Event Timeline

zeljkofilipin updated the task description. (Show Details)
zeljkofilipin updated the task description. (Show Details)

Getting Fresnel to do what we want (i.e. perform an edit) would require changes to the "core" of the code, e.g. in the run function here:
https://gerrit.wikimedia.org/r/plugins/gitiles/performance/fresnel/+/refs/heads/master/src/recorder.js

It might be easier to modify synthetic tests, as it looks like we can add arbitrary scenarios, such as this:
https://gerrit.wikimedia.org/r/plugins/gitiles/performance/synthetic-monitoring-tests/+/refs/heads/master/tests/desktop/loginDesktop.js

Change 762775 had a related patch set uploaded (by Zfilipin; author: Zfilipin):

[performance/fresnel@master] docs: Update links in README

https://gerrit.wikimedia.org/r/762775

Change 762775 merged by jenkins-bot:

[performance/fresnel@master] docs: Update links in README

https://gerrit.wikimedia.org/r/762775