Add scale test mode to example agent#481
Add scale test mode to example agent#481tigrannajaryan merged 26 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #481 +/- ##
=======================================
Coverage 81.70% 81.70%
=======================================
Files 27 27
Lines 2137 2137
=======================================
Hits 1746 1746
Misses 266 266
Partials 125 125 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0313b0a to
e090918
Compare
0b3bbf2 to
d10f4e3
Compare
b26d752 to
0225f00
Compare
|
If I limit the (docker) server image to only 2 CPUs, and 256M memory, enrolling 4000 leaves the container memory usage at 80% (as reported by The server encounters no errors during this time; and all agents are able to report that all send connection settings have been applied. I'm using my laptop, a 2023 MacBook Pro with an Apple M3 Pro chip for these tests.
|
|
The direction of this PR looks good to me. Modify the existing example agent to be reusable for scale testing. |
| "strconv" | ||
| "time" | ||
|
|
||
| opampinternal "github.com/open-telemetry/opamp-go/internal" |
There was a problem hiding this comment.
This will break if the examples are moved to another repository. Currently there’s no direct dependency on opamp-go/internal even though the examples live under internal/examples.
I recommend duplicating NopLogger in internal/examples/agent/agent/logger.go:
type NopLogger struct{}
func (l *NopLogger) Debugf(ctx context.Context, format string, v ...interface{}) {}
func (l *NopLogger) Errorf(ctx context.Context, format string, v ...interface{}) {}There was a problem hiding this comment.
I used the existing NopLogger in order to avoid code duplication
|
I've split off the example server metrics into: #499 |
|
Running a docker container running with I destroy and recreate the the opamp-server for each test, The above stats are what generally occur once the server is "at rest" (few messages are exchanged). No server error callbacks are triggered in the above tests. However the CPU usage goes over 200% during the initial message exchanges. When the scale count is set to 10k we see: However (read) errors are present in the opamp-server |
Add a scale test mode to the example agent that will start a lot of agents (1 goroutine per agent) that connect to a server.
This allows us to leverage all capabilities in the spec that have been added to the example agent.