Skip to content

Commit

Permalink
Merge pull request #46 from tarides/counter_events
Browse files Browse the repository at this point in the history
Emit counter events
  • Loading branch information
kayceesrk authored Jul 25, 2024
2 parents bf8b316 + 808433b commit 973928d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/olly_trace/olly_trace.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ let trace fmt trace_filename exec_args =
kind;
}
in
let runtime_counter ring_id ts counter value =
Format.emit tracer
{
name = Runtime_events.runtime_counter_name counter;
ts = Runtime_events.Timestamp.to_int64 ts;
ring_id;
kind = Counter value;
}
in
let runtime_begin = runtime_phase SpanBegin
and runtime_end = runtime_phase SpanEnd
and init () = ()
Expand All @@ -21,9 +30,9 @@ let trace fmt trace_filename exec_args =
let open Olly_common.Launch in
olly
{
empty_config with
extra;
runtime_begin;
runtime_counter;
runtime_end;
lifecycle;
init;
Expand Down

0 comments on commit 973928d

Please sign in to comment.