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: 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)
- 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.