Table Reporter#

The table reporter generates an HTML document showing a simple tabular view of the allocations contributing to the tracked process’s peak memory usage. Each source line that contributed to that peak memory usage is given a row in the generated table, showing the amount of memory it allocated, the type of allocator it used, and the number of allocations it was responsible for.

_images/table_example.png

The table can be sorted by each column and searched in the search field. The columns show the following data:

  • Thread ID: thread where the allocation happened

  • Size: total amount of memory used by all of these allocations

  • Allocator: allocator or deallocator function which acquired the memory

  • Allocations: total number of allocations performed by this entry

  • Location: function name, file and line of the allocation or “???” if unknown

Basic Usage#

The general form of the table subcommand is:

memray table [options] <results>

The only argument the table subcommand requires is the capture file previously generated using the run subcommand.

The output file will be named as memray-table-<input file name>.html unless the -o argument was specified to override the default name.

CLI Reference#

usage: memray table [-h] [-o OUTPUT] [-f] [--leaks] results

Positional Arguments#

results

Results of the tracker run

options#

-o, --output

Output file name

-f, --force

If the output file already exists, overwrite it

Default: False

--leaks

Show memory leaks, instead of peak memory usage

Default: False

Please submit feedback, ideas, and bug reports by filing a new issue at https://github.com/bloomberg/memray/issues