-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Drop NetTrail - emit iterations metrics in runner instead of dialer #3908
Conversation
This is an artifact of both data sent/received and iterations being in the same SampleContainer. So where one was emitted we needed to emit the other. That hasn't been a requirement for a while as evident by the dropping of NetTrail with no breaking in outputs. This also stops emitting `iteration_duration` in not default functions (teardown, setup) as it already does for `iterations`. Closes #1605 Part of #1250
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.
Looks good, left two minors
execution/scheduler_ext_test.go
Outdated
if v, ok := tags["customTag"]; ok && v == "value" { | ||
gotNetTrailTag = true | ||
for _, s := range sample.GetSamples() { | ||
if s.Metric.Name == metrics.DataSentName && !gotNetTrailTag { |
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.
nit: after the change, this gotNetTrailTag
could confuse
lib/netext/dialer.go
Outdated
@@ -69,17 +69,14 @@ func (d *Dialer) DialContext(ctx context.Context, proto, addr string) (net.Conn, | |||
return conn, err | |||
} | |||
|
|||
// GetTrail creates a new NetTrail instance with the Dialer | |||
// Sample creates a new NetTrail instance with the Dialer |
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.
How about naming this something like ReadsWritesSamples
or IOSamples
, something more precise? Also, a method comment not longer valid 😢
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.
I meant it more like hte verb "sample" as in dialer samples whatever it has to sample and returns it. But it isn't a thing we usually do so I had it renamed
What?
Drop the NetTrail container and emit iterations metric in runner instead of in Dialer.
Also fix #1605
Why?
As part of looking over issues I found #1250 which has some additional work required. But dropping the specific NetTrail and moving the code around was really simple.
FIxing some of the test took a bit more time :(
Checklist
make lint
) and all checks pass.make tests
) and all tests pass.Related PR(s)/Issue(s)
#1250
#1605