Chrome tracing
Bryan O'Sullivan
bos at serpentine.com
Sun Feb 12 07:34:01 UTC 2017
I put together a proof of concept patch tonight that adds the ability to
use light(ish)weight instrumentation to generate trace files that the
Chrome trace tool can render.
Here's a local clone --pull of Mercurial itself:
http://i.imgur.com/efWjFyE.png
And the corresponding trace file, so you can mess around with it:
http://pastebin.com/qXGfwQ3j
Here's "log -l100" in an old copy of mozilla-central:
http://i.imgur.com/2pyvT43.png
And its trace file:
http://pastebin.com/k2Q2WiLu
The patch itself reveals how easy this functionality is to use:
http://pastebin.com/7zR61UhB
It's not hard to see how you could e.g. get --profile output into this
format, and with a little massaging get a potentially interesting way of
drilling into performance in detail.
What's interesting about this patch, even in its current very hacky form,
is how amenable to fishing expeditions it is. You can easily add temporary
lightweight instrumentation anywhere. It also seems clear that some of this
kind of instrumentation would be valuable to add permanently. For example,
I noticed tonight, just by looking at a trace, that hg-git takes over a
hundred milliseconds to load.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170211/337add1b/attachment.html>
More information about the Mercurial-devel
mailing list