-
-
Notifications
You must be signed in to change notification settings - Fork 646
[management] push benchmark results to grafana #3701
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
Conversation
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.
Pull Request Overview
This PR enhances benchmark reporting by pushing benchmark results to Grafana via Prometheus metrics while updating benchmark tests to run only in CI. Key changes include:
- Adding a Prometheus gauge vector (benchmarkDuration) and integrating it within EvaluateBenchmarkResults.
- Removing local performance thresholds in favor of external metric push.
- Updating benchmark tests and CI pipelines to ensure proper CI environment variables and service initialization.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
management/server/http/testing/testing_tools/tools.go | Introduces Prometheus metric gauge and modifies EvaluateBenchmarkResults to use metric push. |
management/server/http/testing/benchmarks/users_handler_benchmark_test.go | Updates benchmark tests for users and adds CI skipping. |
management/server/http/testing/benchmarks/setupkeys_handler_benchmark_test.go | Updates benchmark tests for setup keys and adds CI skipping. |
management/server/http/testing/benchmarks/peers_handler_benchmark_test.go | Updates benchmark tests for peers and adds CI skipping. |
.github/workflows/golang-test-linux.yml | Configures CI environment and starts Prometheus and Pushgateway services for benchmarking. |
Files not reviewed (1)
- go.mod: Language not supported
Comments suppressed due to low confidence (2)
management/server/http/testing/testing_tools/tools.go:345
- Consider externalizing the Pushgateway URL (currently hard-coded as 'http://localhost:9091') to an environment variable, so the configuration becomes more flexible and environment agnostic.
if err := push.New("http://localhost:9091", "api_benchmark").Collector(benchmarkDuration).Push(); err != nil {
management/server/http/testing/testing_tools/tools.go:327
- [nitpick] The parameter 'testCase' is passed a variable named 'name' from the tests; consider renaming it (for example, to 'benchmarkCase') to ensure consistent and clear naming across the codebase.
func EvaluateBenchmarkResults(b *testing.B, testCase string, duration time.Duration, recorder *httptest.ResponseRecorder, module string, operation string) {
|
Describe your changes
Issue ticket number and link
Stack
Checklist