mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
add profile.memory service documentation (#15441)
This commit is contained in:
parent
3d597bb5b7
commit
5cd428a576
@ -33,3 +33,20 @@ Additionally, the profiler will generate a `callgrind.out` file that can be view
|
||||
|
||||
[kcachegrind](https://kcachegrind.github.io/) or qcachegrind
|
||||
|
||||
### Service `profiler.memory`
|
||||
|
||||
Start the memory profiler for the specified number of seconds.
|
||||
|
||||
| Service data attribute | Optional | Description |
|
||||
| ---------------------- | -------- | ----------- |
|
||||
| `seconds` | yes | The number of seconds to run the profile. Defaults to 60.0
|
||||
|
||||
When the memory profile is complete, Profiler will generate a `.hpy` file in your configuration directory. The exact path to these files will appear in a persistent notification so they can be easily located and copied to your desktop.
|
||||
|
||||
The `hpy` file can be viewed with any text editor. A visual representation can be viewed using the [Heapy Profile Browser](http://guppy-pe.sourceforge.net/ProfileBrowser.html) which is a part of the guppy3 package and can be launched via the below script:
|
||||
|
||||
```python
|
||||
#! /usr/bin/python3
|
||||
from guppy import hpy
|
||||
hpy().pb()
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user