It would be interesting to generalise our performance metrics to outside just the MediaWiki application stack.
I don't know to what degree the Performance Team has resources to work on this directly, but we may find some times to help the Parsing Team get it set up for Parsoid. From there we would generalise it to then apply to other Node.js services.
For the MediaWiki runtime:
* The Xenon extension in HHVM captures stack traces at regular intervals for code on-CPU.
* [wikimedia/arc-lamp](https://github.com/wikimedia/arc-lamp): PHP script subscribes to the data and sends it to a Redis queue (currently on fluorine; Production actually has a copy of it in [wmf-config/StartProfiler](https://github.com/wikimedia/operations-mediawiki-config/blob/259a74a278a5dacd60c368b8a13fc5f74ef25195/wmf-config/StartProfiler.php#L67-L119))
* xenon-log deamon on flourine subscribes to the queue and produces log files.
* An hourly/daily script produces interactive SVG Flame Graphs at https://performance.wikimedia.org/xenon/
It should be feasible to produce stack traces in a compatible (possibly with a converter in between) and set up another pipeline like this.
Related links:
* http://www.brendangregg.com/FlameGraphs
* http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html#Node.js
* http://www.brendangregg.com/flamegraphs.html#Updates