mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 16:56:50 +00:00
Improved the documentation of the tools to read the prof and the call… (#23149)
This commit is contained in:
parent
2694a4670a
commit
f133ca4e43
@ -28,12 +28,28 @@ When the profile is complete, Profiler will generate a Python `cprof` and a `cal
|
||||
|
||||
The `cprof` file can be viewed with:
|
||||
|
||||
[SnakeViz](https://jiffyclub.github.io/snakeviz/)
|
||||
[Gprof2dot](https://github.com/jrfonseca/gprof2dot)
|
||||
* [SnakeViz](https://jiffyclub.github.io/snakeviz/)
|
||||
* [Gprof2dot](https://github.com/jrfonseca/gprof2dot)
|
||||
|
||||
Additionally, the profiler will generate a `callgrind.out` file that can be viewed with:
|
||||
|
||||
[kcachegrind](https://kcachegrind.github.io/) or qcachegrind
|
||||
* [KCachegrind or QCachegrind](https://kcachegrind.github.io/)
|
||||
* [Gprof2dot](https://github.com/jrfonseca/gprof2dot)
|
||||
|
||||
The gprof2dot tool generates [DOT](http://www.graphviz.org/doc/info/lang.html) files, which can be converted to images using the `dot` tool from [Graphviz](http://www.graphviz.org/) or viewed directly using [xdot](https://github.com/jrfonseca/xdot.py). The `-e` and `-n` parameters can be used to set the minimum percentage required to include a function in the output file. Observe these examples:
|
||||
|
||||
```bash
|
||||
# Generating the .dot files:
|
||||
gprof2dot -f pstats -e 0.05 -n 0.25 profile.1234567890123456.cprof -o profile.dot
|
||||
gprof2dot -f callgrind -e 0.05 -n 0.25 callgrind.out.1234567890123456 -o callgrind.dot
|
||||
|
||||
# Converting to SVG and PNG formats:
|
||||
dot callgrind.dot -Tsvg -o callgrind.svg
|
||||
dot callgrind.dot -Tpng -o callgrind.png
|
||||
|
||||
# Alternatively, both commands in a single line:
|
||||
gprof2dot -f pstats profile.1234567890123456.cprof | dot -Tsvg -o profile.svg
|
||||
```
|
||||
|
||||
### Service `profiler.memory`
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user