-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from humanmade/backport-39-to-v3-branch
[Backport 39 to v3-branch]: Add documentation on flamegraphs
- Loading branch information
Showing
2 changed files
with
9 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |