custom-metrics icon indicating copy to clipboard operation
custom-metrics copied to clipboard

Test comment with WPT link for big metrics

Open max-ostapenko opened this issue 1 year ago • 6 comments

Resolves #146

  • applied formatting (no other changes) to css-variables.js to trigger test results

Test websites:

  • https://www.morgenpost.de/politik/article407241629/game-changer-fuer-die-ukraine-bahnt-sich-an-putin-droht.html

max-ostapenko avatar Sep 21 '24 20:09 max-ostapenko

The point is that there is only one artifact link no matter how many more pages were tested. So putting it under each toggle separately will be confusing.

And since there is basically no unique content to put under the toggle, I got rid of them in favor of a bullet point.

And maybe we just use original WPT results instead of messing with artifact file.

Maybe this look is nicer?


https://almanac.httparchive.org/en/2022/

WPT test results Changed custom metrics values:

{
  "_css-variables": {
    "summary": {}
  }
}
https://www.morgenpost.de/politik/article407241629/game-changer-fuer-die-ukraine-bahnt-sich-an-putin-droht.html

WPT test results Cannot display changed custom metrics due to comment size limits, use test JSON instead.

https://www.example.com

WPT test results Cannot display changed custom metrics due to comment size limits, use test JSON instead.

max-ostapenko avatar Sep 22 '24 13:09 max-ostapenko

The point is that there is only one artifact link no matter how many more pages were tested. So putting it under each toggle separately will be confusing.

Ah gotcha. Didn’t think of that before.

it kinda looked odd in the changes you’ve made here so far. And inconsistent between the tests that had changes (WPT link in summary) and that didn’t (WPT link not in summary).

And since there is basically no unique content to put under the toggle, I got rid of them in favor of a bullet point.

Well the WPT test link is the unique bit of content.

And maybe we just use original WPT results instead of messing with artifact file.

Yeah to me link would be fine. And maybe instead of changed results it could be “Cannot display changed results due to GitHub comment limits. Use the link instead.” Or something like that.

Maybe this look is nicer?

I think it’s still a bit confusing that the “Change custom metric” doesn’t seem to belong to the first bullet.

Honestly if just have them all under summary/details with the link, and the changed metric (or above message if can’t display those for that test).

tunetheweb avatar Sep 22 '24 16:09 tunetheweb

Updated example above (toggles, JSON links, no artifacts). WDYT?

max-ostapenko avatar Sep 22 '24 16:09 max-ostapenko

LGTM!

tunetheweb avatar Sep 22 '24 17:09 tunetheweb

https://almanac.httparchive.org/en/2022/

WPT test results

Changed custom metrics values:

{
  "_css-variables": {
    "summary": {}
  }
}
https://www.morgenpost.de/politik/article407241629/game-changer-fuer-die-ukraine-bahnt-sich-an-putin-droht.html

WPT test results

Cannot display changed custom metrics due to comment size limits, use test JSON instead.

github-actions[bot] avatar Oct 14 '24 13:10 github-actions[bot]

@tunetheweb please review

max-ostapenko avatar Oct 14 '24 13:10 max-ostapenko

Interestingly add-pr-comment step removed the wrong comment:

@github-actions github-actions bot deleted a comment from tunetheweb 25 minutes ago

Let's see if it will happen again in other PRs.

max-ostapenko avatar Oct 14 '24 13:10 max-ostapenko

WPT test results

Cannot display changed custom metrics due to comment size limits, use test JSON instead.

Been a while since I looked at this, so was confused initially. I wanted to be linked to this screen: https://webpagetest.httparchive.org/result/241014_QN_5/1/details/#waterfall_view_step1

But neither of the above links does that directly (though fairly easy to get there from first link but I missed that as was distracted by the second link).

WDYT about changing this:

Cannot display changed custom metrics due to comment size limits, use test JSON instead.

To this:

Cannot display changed custom metrics due to comment size limits, use test details or test JSON instead.

tunetheweb avatar Oct 14 '24 14:10 tunetheweb

A good idea about the details page! But I would keep the other text as it is to avoid having a third and duplicated link.

max-ostapenko avatar Oct 14 '24 14:10 max-ostapenko

document.getElementById("waterfall_view_step1") returns null, so I'll use the next best anchor: https://webpagetest.httparchive.org/result/241014_QN_5/1/details/#result

max-ostapenko avatar Oct 14 '24 16:10 max-ostapenko

https://almanac.httparchive.org/en/2022/

WPT result details

Changed custom metrics values:

{
  "_css-variables": {
    "summary": {}
  }
}
https://www.morgenpost.de/politik/article407241629/game-changer-fuer-die-ukraine-bahnt-sich-an-putin-droht.html

WPT result details

Cannot display changed custom metrics due to comment size limits, view test JSON instead.

github-actions[bot] avatar Oct 14 '24 16:10 github-actions[bot]

@tunetheweb with new link we save 2 clicks :)

At the same time I notice that I can get WPT results details page faster than huge JSON rendered

@pmeenan So I thought maybe we could improve custom metrics rendering in WPT, and avoid needing to load full JSON. Screenshot 2024-10-14 at 18 56 15

max-ostapenko avatar Oct 14 '24 17:10 max-ostapenko

Yeah the fact it's huge (and so I needed to search for the custom metrics) was the main reason I didn't like the JSON.

Can always get that JSON from the link if wanted:

image

tunetheweb avatar Oct 14 '24 17:10 tunetheweb

FWIW, the JSON API takes query params to strip out things and make it a lot smaller and faster.

&requests=0&average=0&standard=0 should make it quite a bit smaller.

pmeenan avatar Oct 14 '24 17:10 pmeenan

https://webpagetest.httparchive.org/jsonResult.php?test=241014_2M_7&pretty=1&requests=0&average=0&standard=0 I didn't notice any difference, still 40.8Mb

Seems these parameters require &pretty=0, which then makes it unreadable.

max-ostapenko avatar Oct 14 '24 22:10 max-ostapenko