trivium 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ asked for, it says which, and exits 2.
|
|
|
12
12
|
|
|
13
13
|
<picture>
|
|
14
14
|
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/metonym/trivium/master/.github/assets/load-dark.png">
|
|
15
|
-
<img alt="trivium load on TodoMVC's React example at mobile throttling: LCP
|
|
15
|
+
<img alt="trivium load on TodoMVC's React example at mobile throttling: LCP 2.02 s, CLS 0.030 and TBT 121 ms, all good, with each median's noise, bytes by type and how each request was answered, ending Vitals pass" src="https://raw.githubusercontent.com/metonym/trivium/master/.github/assets/load-light.png">
|
|
16
16
|
</picture>
|
|
17
17
|
|
|
18
18
|
That's TodoMVC's React example, live,
|
|
@@ -21,7 +21,7 @@ While a run is in flight, one line says where it is:
|
|
|
21
21
|
|
|
22
22
|
<picture>
|
|
23
23
|
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/metonym/trivium/master/.github/assets/progress-dark.png">
|
|
24
|
-
<img alt="trivium's progress line: a bar at load 4 of 5, LCP so far
|
|
24
|
+
<img alt="trivium's progress line: a bar at load 4 of 5, LCP so far 2.02 s, 19 s in" src="https://raw.githubusercontent.com/metonym/trivium/master/.github/assets/progress-light.png">
|
|
25
25
|
</picture>
|
|
26
26
|
|
|
27
27
|
The same app's seven interactions, scripted in a config
|
|
@@ -29,7 +29,7 @@ and run with native input:
|
|
|
29
29
|
|
|
30
30
|
<picture>
|
|
31
31
|
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/metonym/trivium/master/.github/assets/interactions-dark.png">
|
|
32
|
-
<img alt="trivium interactions on TodoMVC: INP
|
|
32
|
+
<img alt="trivium interactions on TodoMVC: INP 136 ms, good, over seven steps, from focusing the input to clearing completed todos, each with its latency, noise and layout shift" src="https://raw.githubusercontent.com/metonym/trivium/master/.github/assets/interactions-light.png">
|
|
33
33
|
</picture>
|
|
34
34
|
|
|
35
35
|
## Quick start
|
|
@@ -86,16 +86,22 @@ in
|
|
|
86
86
|
```sh
|
|
87
87
|
# cold-load vitals, median of 5
|
|
88
88
|
bunx trivium load https://example.com
|
|
89
|
+
|
|
89
90
|
# a second visit with a warm cache
|
|
90
91
|
bunx trivium load --repeat
|
|
92
|
+
|
|
91
93
|
# two builds against each other, alternating, with a noise column
|
|
92
94
|
bunx trivium compare dist-main dist
|
|
95
|
+
|
|
93
96
|
# what immutable asset headers would save on a repeat visit
|
|
94
97
|
bunx trivium compare dist dist --repeat --immutable
|
|
98
|
+
|
|
95
99
|
# latency, loader time and layout shift for each config step
|
|
96
100
|
bunx trivium interactions
|
|
101
|
+
|
|
97
102
|
# raw, gzip and brotli per file, against the last build
|
|
98
103
|
bunx trivium bundle dist --base dist-main
|
|
104
|
+
|
|
99
105
|
# fail CI when hashed assets aren't cached a year and immutable
|
|
100
106
|
bunx trivium cache https://example.com
|
|
101
107
|
```
|
|
@@ -122,7 +128,7 @@ On a Vite React starter, before and after swapping moment for
|
|
|
122
128
|
|
|
123
129
|
<picture>
|
|
124
130
|
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/metonym/trivium/master/.github/assets/compare-dark.png">
|
|
125
|
-
<img alt="trivium compare dist-main dist: B is better on
|
|
131
|
+
<img alt="trivium compare dist-main dist: B is better on 4 of 8 metrics and worse on none, LCP 64 ms faster, the rest marked as within the noise" src="https://raw.githubusercontent.com/metonym/trivium/master/.github/assets/compare-light.png">
|
|
126
132
|
</picture>
|
|
127
133
|
|
|
128
134
|
`cache` crawls the page and every asset it can load,
|