HTTPArchive / custom-metrics

Custom metrics to use with WebPageTest agents
Apache License 2.0
19 stars 22 forks source link

Add feature flag metric #104

Closed devknoll closed 8 months ago

devknoll commented 8 months ago

The detail field in performance.mark doesn't seem to be available in HTTP Archive, so this PR adds a custom metric that extracts a set of feature names according to the User Timing specification. This also includes support for the previous name, since some pages are using it.

Test websites:

rviscomi commented 8 months ago

FYI if you include this markdown in your PR description, the GH action will automatically test your changes on the provided URLs:

**Test websites**:

- https://example.com/

(I've updated the PR template so it should be clearer next time)

devknoll commented 8 months ago

Neat 👍 I edited and kicked it off so I could see :)

github-actions[bot] commented 8 months ago
Custom metrics for https://almanac.httparchive.org/en/2022/ WPT test run results: http://webpagetest.httparchive.org/results.php?test=240109_KZ_2
Custom metrics for https://angular.io/ WPT test run results: http://webpagetest.httparchive.org/results.php?test=240109_1V_3 Changed custom metrics values: ```json { "_aurora": { "ng_version": "17.0.0", "ng_img_user": null, "ng_priority_img_count": null, "nuxt_version": null, "nuxt_vue_version": null, "react_version": null, "svelte_version": null, "feature_flags": [ "NgControlFlow" ] } } ```
Custom metrics for https://angular.dev/ WPT test run results: http://webpagetest.httparchive.org/results.php?test=240109_08_4 Changed custom metrics values: ```json { "_aurora": { "ng_version": "17.0.0-rc.1", "ng_img_user": null, "ng_priority_img_count": null, "nuxt_version": null, "nuxt_vue_version": null, "react_version": null, "svelte_version": null, "feature_flags": [ "NgHydration", "NgDefer", "NgAfterNextRender", "NgHttpTransferCache" ] } } ```
Custom metrics for https://svelte.dev/ WPT test run results: http://webpagetest.httparchive.org/results.php?test=240109_CD_5 Changed custom metrics values: ```json { "_aurora": { "ng_version": null, "ng_img_user": null, "ng_priority_img_count": null, "nuxt_version": null, "nuxt_vue_version": null, "react_version": null, "svelte_version": "4", "feature_flags": [] } } ```
rviscomi commented 8 months ago

@pmeenan since WPT has support for custom marks and measures, is this something that could be useful upstream?