diff options
| author | Paul Buetow <paul@buetow.org> | 2025-03-29 11:25:27 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-03-29 11:25:27 +0200 |
| commit | 8a34be1f4fffca90d74e2092c7bc5a6af02392c4 (patch) | |
| tree | f003dc1b8d95a31bf8d01c786e98a5a622ac43cd /internal/flamegraph/counter.go | |
| parent | 5f1b3be8ac4013ac7cf5041de339317defeb75ce (diff) | |
fix
Diffstat (limited to 'internal/flamegraph/counter.go')
| -rw-r--r-- | internal/flamegraph/counter.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/flamegraph/counter.go b/internal/flamegraph/counter.go new file mode 100644 index 0000000..4a63f50 --- /dev/null +++ b/internal/flamegraph/counter.go @@ -0,0 +1,14 @@ +package flamegraph + +type counter struct { + count uint64 + duration uint64 + durationToPrev uint64 +} + +func (c counter) add(other counter) counter { + c.count += other.count + c.duration += other.duration + c.durationToPrev += other.durationToPrev + return c +} |
