summaryrefslogtreecommitdiff
path: root/internal/flamegraph/counter.go
blob: 98ac035794703e48e5f9f336dd3775b2c392f65f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package flamegraph

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
	return c
}