Eio_runtime_eventsThis library is used to write event traces using OCaml's runtime events infrastructure.
val obj_ty_to_string : obj_ty -> stringval cc_ty_to_string : cc_ty -> stringval name : (id * string) Runtime_events.User.tval exit_fiber : id Runtime_events.User.tval error : (id * exn) Runtime_events.User.tval fiber : id Runtime_events.User.tval get : id Runtime_events.User.tval try_get : id Runtime_events.User.tval put : id Runtime_events.User.tval domain_spawn : id Runtime_events.User.ttype event = [ | `Create of id * [ `Fiber_in of id | `Cc of cc_ty | `Obj of obj_ty ]| `Fiber of idThe given fiber is now running.
*)| `Name of id * stringNames a promise, stream, etc.
*)| `Log of stringThe running fiber logs a message.
*)| `Enter_span of stringThe running fiber enters a traced section.
*)| `Exit_spanThe running fiber leaves the current traced section.
*)| `Get of idThe running fiber gets a value from a promise, stream, acquires a lock, etc.
*)| `Try_get of idThe running fiber wants to get, but must wait.
*)| `Put of idThe running fiber resolves a promise, adds to a stream, releases a lock etc.
*)| `Error of id * stringA CC fails with the given error.
*)| `Exit_ccThe current CC ends.
*)| `Exit_fiber of idThe running fiber ends.
*)| `Suspend_domain of Runtime_events.Type.spanThe domain asks the OS to wait for events.
*)| `Suspend_fiber of stringThe running fiber is suspended (until resumed by `Fiber).
| `Domain_spawn of idThe current domain was spawned by fiber id.
]val pp_event : Stdlib.Format.formatter -> event -> unitpp_event formats an event as a human-readable string
val add_callbacks :
(int -> Runtime_events.Timestamp.t -> 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.