Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wpt metrics #1871

Merged
merged 8 commits into from
Jan 11, 2018
Merged

Add wpt metrics #1871

merged 8 commits into from
Jan 11, 2018

Conversation

jpvincent
Copy link
Contributor

Your checklist for a pull request to sitespeed.io

Please review the guidelines for contributing to this repository.

  • I'm making a big change or adding functionality so I've already opened an issue proposing the change to other contributors, so I got feedback on the idea before took the time to write precious code
  • Check that your change/fix has corresponding unit tests (if applicable)
  • Squash commits so it looks sane
  • Update the documentation https://github.com/sitespeedio/sitespeed.io/tree/master/docs
  • Verify that the test works by running npm test and test linting by npm run lint

Description

Please describe your pull request and tell us the fix #

Following the new WPT grafana dashboards (sitespeedio/grafana-bootstrap-docker#14), and as requested by @soulgalore here is my proposal to add more metrics from WPT to grafana.

For the demo to work correctly, please activate the webpagetest.timeline option (was already there) and the newly added webpagetest.domainsDashboard.
I also updated the documentation accordingly, tell me if all looks right.

@@ -94,6 +94,9 @@ WebPageTest
--webpagetest.script The WebPageTest script as a string.
--webpagetest.includeRepeatView Do repeat or single views [boolean] [default: false]
--webpagetest.private Wanna keep the runs private or not [boolean] [default: true]
--webpagetest.timeline Activates chrome tracing. More Useful metrics but can slow down the test itself [boolean] [default: false]
--webpagetest.domainsDashboard Record weight and requests for each domain to populate the grafana dashboard. Will take more disk space in graphite [boolean] [default: false]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We send over all webpagetest.* metrics to the WebPageTest API, I think maybe we should mark the ones that are sitespeed.io own, so it makes it easier to understand. @tobli @beenanner any input?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean webpagetest.domainsDashboard :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I thought about deleting the option once it has been used in index.js, but modifying the options directly is never a good idea.

Later on, I would like to add a connection alias (rather than "custom") for WPT, so the same problem will occur.

Maybe we should add a sub namespace, like

--webpagetest.ssio.enableDomains=…
--webpagetest.ssio.connectivityAlias=…

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, either that or adding --webpagetestParams (following the same patterns as we have for some others)? The thing with the WebPageTest NodeJS API is that it changes options passed into it but if I remember correctly we "fixed" that by passing a copy of the object to the api.

Thinking some more, if you add the .ssio and then we could remove it from the cloned version here: https://github.com/sitespeedio/sitespeed.io/blob/master/lib/plugins/webpagetest/analyzer.js#L23

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're the architect, tell me what would fit best

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want input from @beenanner and @tobli :)

@soulgalore
Copy link
Member

@jpvincent Looks great, thanks this will be really cool! Only thing is that extra parameter, let us sync that and then merge.

@soulgalore
Copy link
Member

Let me merge it, add the sub name space and then let it run for a while on dashboard.sitespeed.io and we can add your new dashboards.

@soulgalore soulgalore merged commit c47f8c8 into sitespeedio:master Jan 11, 2018
@soulgalore
Copy link
Member

Thanks again @jpvincent of for the cool contribution :)

@soulgalore
Copy link
Member

I've put the domainsDashboard under -webpagetest.ssio.domainsDashboard but keep it out of the docs and cli for now (like a hidden feature).

'data.median.firstView.visualComplete95',
'data.median.firstView.visualComplete99',
'data.median.firstView.FirstInteractive',
'data.median.firstView.TimeToInteractive',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this prevent the data from repeat view to be processed? because it explicitly says data.media.firstView... now, instead of data.median.*...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooops, you are right, we changed the default behavior there, let me fix that. Usually I only test first view but we shouldn't change how we collect metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants