Module Eio_runtime_events
This library is used to write event traces using OCaml's runtime events infrastructure.
val obj_ty_to_string : Eio_runtime_events.obj_ty -> stringval cc_ty_to_string : Eio_runtime_events.cc_ty -> stringWriting events
val create_fiber :
(Eio_runtime_events.id * Eio_runtime_events.id) Runtime_events.User.tval create_cc :
(Eio_runtime_events.id * Eio_runtime_events.cc_ty) Runtime_events.User.tval create_obj :
(Eio_runtime_events.id * Eio_runtime_events.obj_ty) Runtime_events.User.tval log : string Runtime_events.User.tval enter_span : string Runtime_events.User.tval exit_span : unit Runtime_events.User.tval name : (Eio_runtime_events.id * string) Runtime_events.User.tval suspend_fiber : string Runtime_events.User.tval exit_cc : unit Runtime_events.User.tval exit_fiber : Eio_runtime_events.id Runtime_events.User.tval error : (Eio_runtime_events.id * exn) Runtime_events.User.tval fiber : Eio_runtime_events.id Runtime_events.User.tval get : Eio_runtime_events.id Runtime_events.User.tval try_get : Eio_runtime_events.id Runtime_events.User.tval put : Eio_runtime_events.id Runtime_events.User.tval suspend_domain : Runtime_events.Type.span Runtime_events.User.tval domain_spawn : Eio_runtime_events.id Runtime_events.User.tConsuming events
type event = [ | `Create of Eio_runtime_events.id * [ `Fiber_in of Eio_runtime_events.id | `Cc of Eio_runtime_events.cc_ty | `Obj of Eio_runtime_events.obj_ty ]| `Fiber of Eio_runtime_events.id(*The given fiber is now running.
*)| `Name of Eio_runtime_events.id * string(*Names a promise, stream, etc.
*)| `Log of string(*The running fiber logs a message.
*)| `Enter_span of string(*The running fiber enters a traced section.
*)| `Exit_span(*The running fiber leaves the current traced section.
*)| `Get of Eio_runtime_events.id(*The running fiber gets a value from a promise, stream, acquires a lock, etc.
*)| `Try_get of Eio_runtime_events.id(*The running fiber wants to get, but must wait.
*)| `Put of Eio_runtime_events.id(*The running fiber resolves a promise, adds to a stream, releases a lock etc.
*)| `Error of Eio_runtime_events.id * string(*A CC fails with the given error.
*)| `Exit_cc(*The current CC ends.
*)| `Exit_fiber of Eio_runtime_events.id(*The running fiber ends.
*)| `Suspend_domain of Runtime_events.Type.span(*The domain asks the OS to wait for events.
*)| `Suspend_fiber of string(*The running fiber is suspended (until resumed by
*)`Fiber).| `Domain_spawn of Eio_runtime_events.id(*The current domain was spawned by fiber
*)id.
]val pp_event : Stdlib.Format.formatter -> Eio_runtime_events.event -> unitpp_event formats an event as a human-readable string
val add_callbacks :
(int -> Runtime_events.Timestamp.t -> Eio_runtime_events.event -> unit) ->
Runtime_events.Callbacks.t ->
Runtime_events.Callbacks.tadd_callbacks fn x adds event handler fn to x.
When an Eio event is processed, it calls fn ring_id ts event.