package tracing

  1. Overview
  2. Docs

Represents a pre-computed event header that can be quickly written along with a hardware timestamp into the global trace.

type t
val create_duration : arg_types:Tracing_zero.Writer.Arg_types.t -> category:string -> name:string -> t * t

Returns a separate duration begin and end events, with matching name and category. arg_types are attached to duration begin event only. Duration end event does not have any arguments. create_duration_begin and create_duration_end allow different arguments for begin and end events, but the user must ensure the name and category match.

val create_duration_begin : arg_types:Tracing_zero.Writer.Arg_types.t -> category:string -> name:string -> t

Create duration begin event with arguments.

val create_duration_end : arg_types:Tracing_zero.Writer.Arg_types.t -> category:string -> name:string -> t

Create duration end event with arguments.

val create_instant : arg_types:Tracing_zero.Writer.Arg_types.t -> category:string -> name:string -> t
val create_duration_instant : arg_types:Tracing_zero.Writer.Arg_types.t -> category:string -> name:string -> t

See Tracing.Writer.write_duration_instant.

val write : t -> unit
val write_and_get_tsc : t -> Time_stamp_counter.t