-
Notifications
You must be signed in to change notification settings - Fork 173
Ringbuf: metrics rework #3165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ringbuf: metrics rework #3165
Conversation
f395bec
to
c9ca0f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 28 files reviewed, 1 unresolved discussion (waiting on @oncilla and @sgmonroy)
go/lib/ringbuf/internal/metrics/ringbuf.go, line 28 at r1 (raw file):
func (l *RingbufLabels) Labels() []string { return []string{"RingID"}
ring_id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 28 files reviewed, 1 unresolved discussion (waiting on @kormat)
go/lib/ringbuf/internal/metrics/ringbuf.go, line 28 at r1 (raw file):
Previously, kormat (Stephen Shirley) wrote…
ring_id
Done.
c9ca0f6
to
3191cd8
Compare
3191cd8
to
1a6c36c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 27 of 28 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @karampok and @sgmonroy)
go/border/setup.go, line 68 at r2 (raw file):
r.freePkts = ringbuf.New(1024, func() interface{} { return rpkt.NewRtrPkt() }, "free")
Maybe free_pkts
would be clearer.
go/border/setup_test.go, line 315 at r2 (raw file):
freePkts: ringbuf.New(maxNumPosixInput*inputBufCnt, func() interface{} { return rpkt.NewRtrPkt() }, "free"),
free_pkts
go/lib/ringbuf/ringbuf.go, line 20 at r2 (raw file):
"sync" //"github.com/prometheus/client_golang/prometheus"
Drop.
go/lib/ringbuf/ringbuf.go, line 44 at r2 (raw file):
// New allocates a new Ring instance, with capacity for count entries. If newf // is non-nil, it is called count times to pre-allocate the entries. labels // are attached to the prometheus metrics, and desc is added as an extra label.
Needs updating.
go/lib/ringbuf/internal/metrics/metrics.go, line 19 at r2 (raw file):
const Namespace = "ringbuf" var rb ringbuf
This can be simplified to var rb = newRingBuf()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 24 of 28 files reviewed, 5 unresolved discussions (waiting on @karampok and @kormat)
go/border/setup.go, line 68 at r2 (raw file):
Previously, kormat (Stephen Shirley) wrote…
Maybe
free_pkts
would be clearer.
Done.
go/border/setup_test.go, line 315 at r2 (raw file):
Previously, kormat (Stephen Shirley) wrote…
free_pkts
Done.
go/lib/ringbuf/ringbuf.go, line 20 at r2 (raw file):
Previously, kormat (Stephen Shirley) wrote…
Drop.
Done.
go/lib/ringbuf/ringbuf.go, line 44 at r2 (raw file):
Previously, kormat (Stephen Shirley) wrote…
Needs updating.
Done.
go/lib/ringbuf/internal/metrics/metrics.go, line 19 at r2 (raw file):
Previously, kormat (Stephen Shirley) wrote…
This can be simplified to
var rb = newRingBuf()
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r3.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @karampok)
This change is