Skip to content

Commit 57829a0

Browse files
Update README.md (#168)
* Update README.md * Update README.md
1 parent a4465a5 commit 57829a0

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,27 @@ return {
5858

5959
### Manual testing using webpagetest.org website
6060

61-
To test a custom metric, for example [`doctype.js`](https://github.com/HTTPArchive/legacy.httparchive.org/blob/master/custom_metrics/doctype.js), you can enter the script directly on [webpagetest.org](https://webpagetest.org?debug=1) under the "Custom" tab.
61+
To test a custom metric, for example [`doctype.js`](https://github.com/HTTPArchive/legacy.httparchive.org/blob/master/custom_metrics/doctype.js), you can enter the script directly on [webpagetest.httparchive.org](https://webpagetest.httparchive.org/?debug=1) under "Advanced" -> "Custom" tab.
62+
63+
![Custom tab](https://github.com/user-attachments/assets/902c9f0f-89a7-4281-b724-391fbbbe43ca)
6264

63-
![image](https://user-images.githubusercontent.com/1120896/59539351-e3ecdd80-8eca-11e9-8b43-76bbd7a12029.png)
6465

6566
Note that all WPT custom metrics must have `[metricName]` at the start of the script. This is excluded in the HTTP Archive code and generated automatically based on the file name, so you will need to manually ensure that it's set.
6667
67-
If you include the `debug=1` parameter on the WPT home page, for example [https://webpagetest.org?debug=1](https://webpagetest.org?debug=1), the test results will include a raw debug log from the agent including the devtools commands to run the custom metrics (and any handled exceptions).
68+
If you include the `debug=1` parameter on the WPT home page, for example [https://webpagetest.httparchive.org?debug=1](https://webpagetest.httparchive.org?debug=1), the test results will include a raw debug log from the agent including the devtools commands to run the custom metrics (and any handled exceptions).
6869
The log ouput can be found in the main results page to the left of the waterfall. For each run there will be a link for the "debug log" (next to the timeline and trace links).
6970
7071
To see the custom metric results, select a run, first click on "Details", and then on the "Custom Metrics" link in the top right corner:
7172
72-
![image](https://user-images.githubusercontent.com/1120896/88727164-0e185380-d0fd-11ea-973e-81a50cd24013.png)
73+
![Details results](https://github.com/user-attachments/assets/eaa39b6c-1aa9-43f7-a910-a9eebd1f0a47)
7374
74-
![image](https://user-images.githubusercontent.com/1120896/88727208-24beaa80-d0fd-11ea-8ae1-57df2c8505e4.png)
75+
![Custom metrics](https://github.com/user-attachments/assets/21eba08c-f758-481c-a01a-03477a4b4fd1)
7576
7677
For complex metrics like [almanac.js](./dist/almanac.js) you can more easily explore the results by copy/pasting the JSON into your browser console.
7778
7879
### Automated WPT test runs
7980
80-
1. WPT tests are running using [WPT API wrapper](https://github.com/webpagetest/webpagetest-api).
81+
1. WPT tests are running using [WPT API wrapper](https://github.com/HTTPArchive/WebPageTest.api-nodejs).
8182
2. Test runs are using a private WPT instance, set by the `WPT_HOST` environment variable.
8283
3. By default, WebAlmanac website is used for testing in every PR.
8384
4. PR author can define a list of websites to test additionally, by using a markdown list as shown in [PR template](https://github.com/HTTPArchive/custom-metrics/blob/main/.github/PULL_REQUEST_TEMPLATE/custom_metrics_pr_template.md).

0 commit comments

Comments
 (0)