Skip to content

Commit

Permalink
Merge pull request #45 from humanmade/backport-39-to-v3-branch
Browse files Browse the repository at this point in the history
[Backport 39 to v3-branch]: Add documentation on flamegraphs
  • Loading branch information
roborourke authored Dec 9, 2019
2 parents f84f99e + ecc2925 commit 4892327
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Binary file added docs/assets/qm-flamegraph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/flamegraphs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Flamegraphs

To help in identifying performance bottlenecks and slow performing functions, Developer Tools includes a CPU time [flamegraph](http://www.brendangregg.com/flamegraphs.html) of the current page's execution. Open the Altis Developer Tools and navigate to the "Xray -> Flamegraph" panel.

![Example Flamegraph showing function calls and their execution times](./assets/qm-flamegraph.png)

The flamegraph shows execution time along the X axis. The vertical axis displays the call-depth of the PHP stack at that point in time. The flamegraph can tell you very quickly what is using the most time in the current page generation. Items in the flamegraph are clickable to zoom-in on the specific call. To zoom back out again click on a function below the one currently zoomed into.

Flamegraphs are generated with [our fork](https://github.com/humanmade/xhprof) of the [XHProf PHP extension](https://www.php.net/manual/en/book.xhprof.php), using sampling mode. The sampling interval is set to 5 milliseconds. This is considered the "resolution" of the performance profile, so you should not consider anything taking 5ms or less to be accurately represented in the flamegraph.

0 comments on commit 4892327

Please sign in to comment.