Esc

start_capture

procedureextensionexperimentalsince 0.36.1Source
  • macOS: start_capture works on macOS
  • Linux: start_capture works on Linux
  • Windows: start_capture works on Windows
  • Wasm: start_capture works on Wasm

Attaches to Iprof before opening zones; only one recorder can be attached. Record frames with Iprof.update(true). Stop at a closed-zone boundary, then save and free the captured trace.

Signature

start_capture :: (recorder: *Recorder)
Example↗
I :: #import "Iprof"(IMPORT_MODE = .CLIENT, MANUAL_MODE = true, USE_GRAPHICS = false);
#import "Extensions/Iprof_Trace";

main :: () {
    recorder: Recorder;
    start_capture(*recorder);
    I.zones[0].name = "work";
    I.zones[0].initted = true;
    I.zone_begin(0);
    I.zone_end();
    I.update(true);
    stop_capture(*recorder);
    assert(save_trace(*recorder.trace, "work.jipt"));
    free_trace(*recorder.trace);
}

See also