Skip to content

Commit c470aa3

Browse files
committed
adding link to HTTP Archive Custom metrics repo
1 parent 6f52bea commit c470aa3

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/custom-metrics/examples.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ eleventyNavigation:
1010

1111
Custom metrics are an incredibly powerful way to dig deep into the characterstics of the page you're testing to surface the specific data points you're interested in collecting. Below are some useful samples to get you started.
1212

13+
::: note
14+
You can find even more examples of custom metrics in [The HTTP Archive's](https://httparchive.org/) [public GitHub repository](https://github.com/HTTPArchive/custom-metrics) that collects all the WebPageTest custom metrics they use to power their reports.
15+
:::
16+
1317
Have a custom metric that you don't see here but find particularly useful? [Let us know so we can add it here and share it with everyone.](https://github.com/WPO-Foundation/webpagetest-docs/issues/new?title=New%20Custom%20Metric:)

src/custom-metrics/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ eleventyNavigation:
88

99
WebPagetest can execute arbitrary javascript at the end of a test to collect custom metrics. These can be defined statically in the server configuration or be specified at runtime on a per-test basis.
1010

11+
::: note
12+
[The HTTP Archive](https://httparchive.org/) uses WebPageTest custom metrics to power their reports, as well as the analysis in the [annual Web Almanac](https://almanac.httparchive.org/). The metrics are all available in a [public GitHub repository](https://github.com/HTTPArchive/custom-metrics) if you would like to dig in and get some ideas for what's possible.
13+
:::
14+
1115
The javascript should be written as if it were executing inside of a function call and return the custom metric at the end. Here is an example that finds the meta viewport for the page and extracts it:
1216
```javascript
1317
var viewport = undefined;

src/img/http-archive-logo.png

11.8 KB
Loading

0 commit comments

Comments
 (0)