-
Notifications
You must be signed in to change notification settings - Fork 20
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
[loadgen] Separate into otelbench for benchmarking, otelsoak for soak testing #291
Conversation
1fef60b
to
96b1115
Compare
b.Fatal(err) | ||
} | ||
}) | ||
fmt.Printf("%-*s\t%s\n", maxLen, benchName, result.String()) |
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.
[to reviewer] Printing to stdout as that's what go test -test.bench
does. Not sure why apm-server benchtest writes to stderr (code).
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 don't know either, writing to stdout seems like the right thing to do - so we can easily tee the results to a file without getting any noise from debug logs.
receiver/loadgenreceiver/config.go
Outdated
MaxReplay int `mapstructure:"max_replay"` | ||
// doneCh is only non-nil when the receiver is created with NewFactoryWithDone. | ||
// It is to notify the caller of collector that receiver finished replaying the file for MaxReplay number of times. | ||
doneCh chan TelemetryStats |
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.
[to reviewer] originally i started with sharing a doneCh
across signals, but since it should be used when the signal's MaxReplay is reached, I've made it per-signal. It doesn't make any difference in practice now, since we benchmark per signal now, but it may be useful later when we mix signals in benchmarks.
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.
Beautiful!
Co-authored-by: Andrew Wilkins <[email protected]>
Co-authored-by: Andrew Wilkins <[email protected]>
Co-authored-by: Andrew Wilkins <[email protected]>
Separate loadgen into otelbench and otelsoak.
otelbench
Run go benchmark on top of loadgen collector for a predefined duration
-test.benchtime
.otelbench
accepts go benchmark flags, an otel collector config yaml, and some handy command line options to override the config. It produces go benchmark output.Run
./otelbench -config ./config.yaml -test.benchtime=1m
withELASTIC_APM_SERVER_URL
andELASTIC_APM_SECRET_TOKEN
env vars or flags.Example output:
otelsoak
otelsoak is the Elastic collector components distro with an example collector config file.