From e949b616ce4511801ff70a4644c29ef920727419 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 21 Feb 2026 14:31:29 +0200 Subject: Add byte count tracking to event pairs Amp-Thread-ID: https://ampcode.com/threads/T-019c8012-eaeb-768d-a264-5a704f3939ef Co-authored-by: Amp --- internal/event/pair.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/event') diff --git a/internal/event/pair.go b/internal/event/pair.go index d67ea06..1e9a544 100644 --- a/internal/event/pair.go +++ b/internal/event/pair.go @@ -15,6 +15,7 @@ type Pair struct { Comm string Duration uint64 DurationToPrev uint64 + Bytes uint64 // Number of bytes transferred (read/write/transfer syscalls only) Equals bool } @@ -26,6 +27,7 @@ func NewPair(enterEv Event) *Pair { e.Comm = "" e.Duration = 0 e.DurationToPrev = 0 + e.Bytes = 0 e.Equals = false return e } @@ -99,6 +101,7 @@ func (e *Pair) Recycle() { e.Comm = "" e.Duration = 0 e.DurationToPrev = 0 + e.Bytes = 0 e.Equals = false poolOfEventPairs.Put(e) } -- cgit v1.2.3