summaryrefslogtreecommitdiff
path: root/internal/flamegraph/counter.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/flamegraph/counter.go')
-rw-r--r--internal/flamegraph/counter.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/flamegraph/counter.go b/internal/flamegraph/counter.go
index c12453a..ae727d4 100644
--- a/internal/flamegraph/counter.go
+++ b/internal/flamegraph/counter.go
@@ -4,6 +4,13 @@ import (
"fmt"
)
+// Counter aggregates statistics for a logical flamegraph node.
+//
+// Duration and DurationToPrev use the same timing semantics as event.Pair:
+// - Duration is the syscall runtime on the same thread.
+// - DurationToPrev is the inter-syscall gap on the same thread and is attributed
+// to the current node; there is no separate "idle" pseudo-node.
+// Bytes is only populated for read/write/transfer syscalls.
type Counter struct {
Count uint64
Duration uint64