logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Runtime_events.Callbacks - no description

Documentation

       Module Callbacks
        : sigendtypet

       Type of callbacks.

       valcreate  : ?runtime_begin:(int->Runtime_events.Timestamp.t->Runtime_events.runtime_phase->unit)->?runtime_end:(int->Runtime_events.Timestamp.t->Runtime_events.runtime_phase->unit)->?runtime_counter:(int->Runtime_events.Timestamp.t->Runtime_events.runtime_counter->int->unit)->?alloc:(int->Runtime_events.Timestamp.t->intarray->unit)->?lifecycle:(int->Runtime_events.Timestamp.t->Runtime_events.lifecycle->intoption->unit)->?lost_events:(int->int->unit)->unit->t

       Create  a  Callback  that  optionally subscribes to one or more runtime events. The first int supplied to
       callbacks is the ring buffer index.  Each domain owns a single  ring  buffer  for  the  duration  of  the
       domain's  existence.  After  a  domain  terminates, a newly spawned domain may take ownership of the ring
       buffer. A runtime_begin callback is called when the runtime enters a new phase (e.g a runtime_begin  with
       EV_MINOR  is called at the start of a minor GC). A runtime_end callback is called when the runtime leaves
       a certain phase. The runtime_counter callback is called  when  a  counter  is  emitted  by  the  runtime.
       lifecycle  callbacks  are called when the ring undergoes a change in lifecycle and a consumer may need to
       respond.  alloc callbacks are currently only called on the instrumented runtime.   lost_events  callbacks
       are called if the consumer code detects some unconsumed events have been overwritten.

       valadd_user_event   :   'aRuntime_events.Type.t->(int->Runtime_events.Timestamp.t->'aRuntime_events.User.t->'a->unit)->t->tadd_user_eventtycallbackt extends t to additionally subscribe to user events of type ty . When such an
       event happens, callback is called with the corresponding event and payload.

OCamldoc                                           2025-06-12                       Runtime_events.Callbacks(3o)

Module

       Module   Runtime_events.Callbacks

Name

       Runtime_events.Callbacks - no description

See Also