mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-16 06:49:03 +00:00
Update cheatsheets
This commit is contained in:
29
tldr/memray
Normal file
29
tldr/memray
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# memray
|
||||
|
||||
> Profile memory usage of a Python application.
|
||||
> More information: <https://github.com/bloomberg/memray#usage>.
|
||||
|
||||
- Run a Python file and track memory usage:
|
||||
|
||||
`memray run {{path/to/file}}.py`
|
||||
|
||||
- Run a [m]odule and track memory usage:
|
||||
|
||||
`memray run -m {{module_name}}`
|
||||
|
||||
- Specify an output name:
|
||||
|
||||
`memray run {{[-o|--output]}} {{path/to/output_file}}.bin {{path/to/file}}.py`
|
||||
|
||||
- Display a summary of memory usage:
|
||||
|
||||
`memray summary {{path/to/file}}.bin`
|
||||
|
||||
- Generate an HTML flamegraph:
|
||||
|
||||
`memray flamegraph {{path/to/file}}.bin`
|
||||
Reference in New Issue
Block a user