Qu

profile_end

Builtin index · REPL & diagnostics

profile_end(handle)

Input: handle · Output: no output

What it is

Takes one argument, handle (the Record returned by profile_start(), unmodified). Closes the window and returns a Record with fields time (elapsed seconds) and mem (RSS delta in bytes, NaN if either sample was NaN, e.g. on an unsupported platform). mem is mem_now - mem0, sampled once at each end rather than polled, so a large allocation that also frees before profile_end runs is invisible to it — the same coarse-sampling trade-off qu-cli's own --profile/--max-memory watchdog documents for itself. Errors if handle is missing t0/mem0 or either field isn't a number, naming which field and why. See also tic/toc above for simpler lap timing with no memory tracking, and profiling_mode/profile_stats below for call-count/time attribution across many builtin calls instead of one region.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
profile_end(handle)
handle Record or numbernot documented yet
not documented yetCloses the window and returns a Record with fields time (elapsed seconds) and mem (RSS delta in bytes, NaN if either sample was NaN, e.g. on an unsupported platform). mem is mem_now - mem0, sampled once at each end rather than polled, so a large allocation that also frees before profile_end runs is invisible to it — the same coarse-sampling trade-off qu-cli's own --profile/--max-memory watchdog documents for itself. See also tic/toc above for simpler lap timing with no memory tracking, and profiling_mode/profile_stats below for call-count/time attribution across many builtin calls instead of one region.

Examples

No documentation example calls this form yet. The REPL & diagnostics chapter is where one belongs.