Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit counter events #46

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading