How can I collect painting time by using Chrome Debugging Protocol?

63 views
Skip to first unread message

Chen Yang

unread,
Mar 28, 2016, 1:57:58 AM3/28/16
to Google Chrome Developer Tools
I collected some data from two timeline events.

1.Paint

2.CompositeLayers


For "Paint" event,I used the "dur" as its time.

For "CompositeLayers" event,I used the "ts" difference between the "Begin" event and the "End" event as its time.


Then I summed the time of all these event to get a total painting time.

Just like the "painting time" in chrome devtools timeline panel.



But my result is smaller than the "Painting time" which I got from Chrome timeline.

Sometimes it's smaller than half of the result from Chrome timeline.


I want to know the reason.


Can anyone help me?

Is there any better ways to do it?


Thanks.









Paul Irish

unread,
Mar 28, 2016, 2:52:30 PM3/28/16
to Google Chrome Developer Tools
I've got a node module that can help you out with this sort of analysis.


I've just added first-class support for grouping all costs by the event name.


Output: 
Inline image 2

The API should be straightforward, but I've created a simple example script for you.

Good luck! And feel free to file issues or pull requests against that repo. :)









--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/344ef9d6-7b5d-42ee-9db3-fec1e755b61f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chen Yang

unread,
Mar 30, 2016, 3:57:50 AM3/30/16
to Google Chrome Developer Tools
Thank you very much.

I have tried your module.It's awesome.But the"Paint time" and "CompositeLayers time" from your module is almost equal to my result.So the total painting time is still smaller than the result from Chrome timeline.

I also found that there are two "CompositorTileWorker" which is used to execute rasterize painting. It seems that there should be a "Rasterize" event.But I can't get this event.I can only find two events "RasterTask" and "RasterizerTaskImpl::RunOnWorkerThread". 

Should I add these two events to the total painting time?

Thanks
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages