Request_idinclude Core.Identifiableval bin_size_t : t Bin_prot.Size.sizerval bin_write_t : t Bin_prot.Write.writerval bin_read_t : t Bin_prot.Read.readerval __bin_read_t__ : (int -> t) Bin_prot.Read.readerval bin_writer_t : t Bin_prot.Type_class.writerval bin_reader_t : t Bin_prot.Type_class.readerval bin_t : t Bin_prot.Type_class.tval t_of_sexp : Sexplib0__.Sexp.t -> tval sexp_of_t : t -> Sexplib0.Sexp.tval of_string : string -> tval to_string : t -> stringval pp : Base__.Formatter.t -> t -> unitmodule Replace_polymorphic_compare : sig ... endval comparator : (t, comparator_witness) Core__Comparator.comparatormodule Map : sig ... endmodule Set : sig ... endval hash_fold_t : t Base__Ppx_hash_lib.hash_foldval hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_valueval hashable : t Core__.Hashtbl.Hashable.tmodule Table : sig ... endmodule Hash_set : sig ... endmodule Hash_queue : sig ... endval create : unit -> ?now:Core.Time_ns.Span.t -> unit -> tCreates a function for generating new request IDs and starting new requests. The generated requests will have sequential IDs starting from 0.
Finishes the given request and returns the finished request. This function expects a Started request, and will raise if called on a Finished request.
val id : t -> intReturns unique ID of the request.
val span : t -> Core.Time_ns.Span.t optionReturns the duration of the given request as a Time_ns.Span.t, or None if the request is not finished.
val span_exn : t -> Core.Time_ns.Span.tReturns the duration of a finished request ID.