Skip to content

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

Merged
strub merged 1 commit into
mainfrom
feat/tstats-gc
Oct 19, 2026
Merged

strub merged 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.
@strub strub self-assigned this Oct 19, 2026
@strub strub added the yolo-pr Don't bother reviewing, I will merge label Oct 19, 2026
@strub
strub enabled auto-merge October 19, 2026 10:32
@strub
strub disabled auto-merge October 19, 2026 10:32
@strub
strub merged commit a2cd7bf into main Oct 19, 2026
20 checks passed
@strub
strub deleted the feat/tstats-gc branch October 19, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

yolo-pr Don't bother reviewing, I will merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant