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

Exploring perf results in Timeline #616

Closed
paulirish opened this issue Aug 27, 2016 · 4 comments
Closed

Exploring perf results in Timeline #616

paulirish opened this issue Aug 27, 2016 · 4 comments

Comments

@paulirish
Copy link
Member

paulirish commented Aug 27, 2016

While the pwmetrics project gives a UI for the perf results, it's more valuable to see them against the timeline. I started an initial spike on this and wanted to share.

This is a trace of theverge.com loading, recorded w/ Lighthouse:

lh metrics in timeline - theverge

The following metrics are in here: First contentful paint, First meaningful paint, First visual change, Visually complete, Perceptual Speed Index, Time to Interactive

The basic flow: With --save-assets on, we take our metrics and turn them into fake trace events. We then inject them into the trace right before we save it to disk. Then, loading it in Timeline, we spot those and create markers. (UX-wise the markers are kind of a pain to deal with, so we can definitely think about smarter UI.)

@paulirish
Copy link
Member Author

paulirish commented Aug 27, 2016

If you want to try the devtools patch out, you can try it via the new fancy devtools contrib workflow:

# clone the standalone devtools frontend repo
git clone https://github.com/ChromeDevTools/devtools-frontend/
cd devtools-frontend
git checkout -b metrikz

# grab the unified patch of CL 2283793005
wget https://codereview.chromium.org/download/issue2283793005_1.diff
# adjust the paths, as our git clone is a subtree..
sed -i -e "s/third_party\/WebKit\/Source\/devtools\///" issue2283793005_1.diff
# apply the diff to working folder
git apply issue2283793005_1.diff

# start the _new_ devtools hacker webserver
npm run server
# open the standalone devtools (don't really need to debug a page)
open "http://localhost:8090/front_end/inspector.html?experiments=true"

# and now drag in a metrics-adorned trace into Timeline panel. 
# Profit!

Attached: A zip of the trace I screenshotted above: www.theverge.trace.json.zip

@addyosmani
Copy link
Member

This works really nice using the above workflow. Took just a few mins to setup.

screen shot 2016-08-26 at 10 09 05 pm

Paul wins all the internet 🌟 🌟 🌟 today.

@paulirish
Copy link
Member Author

New, improved implementation (on the exportmetricstotrace branch). Just using straight up measures means no devtools-side changes. :)

image

@addyosmani
Copy link
Member

Damn, that's slick. You're grouping them in to user timings? Just as useful as the other view :)

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

No branches or pull requests

2 participants