Skip to content

feat(compile): memory statistics in -tstats - #1209

Open
strub wants to merge 1 commit into
mainfrom
feat/tstats-gc
Open

strub wants to merge 1 commit into
mainfrom
feat/tstats-gc

Conversation

@strub

@strub strub commented Oct 14, 2026

Copy link
Copy Markdown
Member

-tstats <file> recorded, for each command of the compiled file, its
location and its time. It now also records, as key=value fields
after these two, its CPU time, the memory it allocated, the size and
the peak size of the major heap after it, and the number of major
collections during it:

1:0 7:23 0.083473 cpu=0.080641 alloc=133.550 heap=33.5 top=33.5 gc=1

Sizes are in MB. They come from Gc.quick_stat, which costs nothing
noticeable. The peak size of the major heap shows which commands make
a file need its memory, and the allocated memory measures the work of
a command independently of the load of the machine.

`-tstats <file>` recorded, for each command of the compiled file, its
location and its time. It now also records, as `key=value` fields
after these two, its CPU time, the memory it allocated, the size and
the peak size of the major heap after it, and the number of major
collections during it:

    1:0 7:23 0.083473 cpu=0.080641 alloc=133.550 heap=33.5 top=33.5 gc=1

Sizes are in MB. They come from `Gc.quick_stat`, which costs nothing
noticeable. The peak size of the major heap shows which commands make
a file need its memory, and the allocated memory measures the work of
a command independently of the load of the machine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant