diff options
| author | Paul Buetow <paul@buetow.org> | 2025-04-10 21:28:45 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-04-10 21:28:45 +0300 |
| commit | 017494938f061fd1276f2a54b1df0e7002655e9f (patch) | |
| tree | 9c98fbf31b524233b637079a0482b4255eb6e388 /internal/flamegraph/counter.go | |
| parent | 9572fa5d087731f68d55517847833f6203b9a70d (diff) | |
can serialize and deserialize to/from gob
Diffstat (limited to 'internal/flamegraph/counter.go')
| -rw-r--r-- | internal/flamegraph/counter.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/internal/flamegraph/counter.go b/internal/flamegraph/counter.go index bc30df0..96cfe06 100644 --- a/internal/flamegraph/counter.go +++ b/internal/flamegraph/counter.go @@ -1,16 +1,16 @@ package flamegraph -type counter struct { - count uint64 - duration uint64 - durationToPrev uint64 - bytes uint64 // TODO: implement +type Counter struct { + Count uint64 + Duration uint64 + DurationToPrev uint64 + Bytes uint64 // TODO: implement } -func (c counter) add(other counter) counter { - c.count += other.count - c.duration += other.duration - c.durationToPrev += other.durationToPrev - c.bytes += other.bytes +func (c Counter) add(other Counter) Counter { + c.Count += other.Count + c.Duration += other.Duration + c.DurationToPrev += other.DurationToPrev + c.Bytes += other.Bytes return c } |
