summaryrefslogtreecommitdiff
path: root/internal/event
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-21 14:31:29 +0200
committerPaul Buetow <paul@buetow.org>2026-02-21 14:31:29 +0200
commite949b616ce4511801ff70a4644c29ef920727419 (patch)
tree6a968337feb5a11a2e0995e0080037b3bdbec409 /internal/event
parentb5792f8e23d1599dcce49bc83e5d128abee484f3 (diff)
Add byte count tracking to event pairs
Amp-Thread-ID: https://ampcode.com/threads/T-019c8012-eaeb-768d-a264-5a704f3939ef Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'internal/event')
-rw-r--r--internal/event/pair.go3
1 files changed, 3 insertions, 0 deletions
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)
}