12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485moduletypeName=sigvalname:string(** Name of timing hierarchy.
Used in {!S.print} and TEF track. *)end(** Timing options. *)typeoptions={cputime:bool;(** Measure CPU time, both userspace and kernel, including child processes. *)walltime:bool;(** Measure wall time. *)allocated:bool;(** Measure allocated memory. *)count:bool;(** Count calls. *)tef:bool;(** Output a TEF track. *)}(** Timing tree node. *)typetree={name:string;(** Name of node. *)mutablecputime:float;(** Accumulated CPU time in seconds. *)mutablewalltime:float;(** Accumulated wall time in seconds. *)mutableallocated:float;(** Accumulated allocated memory in bytes. *)mutablecount:int;(** Number of repetitions. Only set if {!Timing.countCalls} is true. *)mutablechildren:treelist;(** Child nodes. *)}(** Timing hierarchy. *)moduletypeS=sig(** {2 Lifecycle} *)valstart:options->unit(** Start timing with options. *)valstop:unit->unit(** Stop timing, but don't reset timing information. *)valreset:unit->unit(** Reset timing information. *)(** {2 Measurement} *)valenter:?args:(string*Catapult.Tracing.arg)list->string->unit(** [enter name] enters a new nested timed section called [name].
@param args custom data for TEF *)valexit:string->unit(** [exit name] exits the current timed section called [name].
Sections must be exited in valid nested fashion. *)valwrap:?args:(string*Catapult.Tracing.arg)list->string->('a->'b)->'a->'b(** [wrap name f x] runs [f x] and measures it as a timed section called [name].
@param args custom data for TEF *)(** {2 Output} *)valprint:Format.formatter->unit(** Pretty-print current timing hierarchy. *)valroot:tree(** Root node of timing tree.
Must not be mutated! *)endmoduletypeGoblint_timing=sigmoduletypeName=Nametypenonrecoptions=optionstypenonrectree=treemoduletypeS=SmoduleMake(Name:Name):S(** Make a new timing hierarchy. *)valsetup_tef:string->unit(** [setup_tef filename] sets up Trace Event Format (TEF) output to [filename].
@see <https://ui.perfetto.dev> for Perfetto UI for opening TEF files.
@see <https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/edit> for TEF specification. *)valteardown_tef:unit->unit(** Tear down TEF output. Must be called to correctly terminate the file. *)end