Skip to content

Commit 564a53b

Browse files
godlygeekpablogsal
authored andcommitted
docs: Document JSON mode for memray stats
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
1 parent d34829f commit 564a53b

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

docs/stats.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@ previously generated using :doc:`the run subcommand <run>`.
3636

3737
The output will be printed directly to the standard output of the terminal.
3838

39+
JSON Output
40+
-----------
41+
42+
If you supply the ``--json`` flag, the ``stats`` subcommand will write its
43+
output to a JSON file, rather than to the terminal. Like other commands that
44+
output to files, the default output file name is based on the name of your
45+
capture file, but it can be overridden with the ``-o`` / ``--output`` option.
46+
By default Memray will refuse to overwrite an existing file, but you can force
47+
it to by supplying the ``-f`` / ``--force`` option.
48+
49+
Note that new fields may be added to the JSON output over time, though we'll
50+
try to avoid removing existing fields.
3951

4052
CLI Reference
4153
-------------

0 commit comments

Comments
 (0)