Skip to content

Commit

Permalink
Add explanation for why we add both cpu/wall-time duration as well as…
Browse files Browse the repository at this point in the history
… timeline duration
  • Loading branch information
ivoanjo committed Dec 11, 2023
1 parent 70479a5 commit 391db52
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,11 @@ VALUE thread_context_collector_sample_after_gc(VALUE self_instance) {
state->sampling_buffer,
state->recorder_instance,
(sample_values) {
// This event gets both a regular cpu/wall-time duration, as a normal cpu/wall-time sample would, as well as a
// timeline duration.
// This is done to enable two use-cases:
// * regular cpu/wall-time makes this event show up as a regular stack in the flamegraph
// * the timeline duration is used when the event shows up in the timeline
.cpu_time_ns = state->gc_tracking.accumulated_cpu_time_ns,
.cpu_or_wall_samples = 1,
.wall_time_ns = state->gc_tracking.accumulated_wall_time_ns,
Expand Down

0 comments on commit 391db52

Please sign in to comment.