Update cheatsheets

This commit is contained in:
ivuorinen
2026-01-25 00:25:05 +00:00
parent 7b572f2b7c
commit 2aa4763c61
10 changed files with 238 additions and 3 deletions

29
tldr/memray Normal file
View 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`