-
Notifications
You must be signed in to change notification settings - Fork 412
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
chore(ci): simplify the flask simple benchmark suite #8902
Conversation
This benchmark is just hanging in CI, because there isn't a trace agent available it is just spamming with "cannot send traces/profiles..." messages. |
BenchmarksBenchmark execution time: 2024-04-30 18:12:59 Comparing candidate commit 3a91539 in PR branch Found 29 performance improvements and 8 performance regressions! Performance is the same for 172 metrics, 9 unstable metrics. scenario:coreapiscenario-context_with_data_listeners_and_all_listeners
scenario:coreapiscenario-context_with_data_no_listeners
scenario:coreapiscenario-core_dispatch_listeners
scenario:coreapiscenario-core_dispatch_listeners_and_all_listeners
scenario:coreapiscenario-core_dispatch_only_all_listeners
scenario:coreapiscenario-core_dispatch_with_results_no_listeners
scenario:coreapiscenario-core_dispatch_with_results_only_all_listeners
scenario:coreapiscenario-get_item_exists
scenario:coreapiscenario-get_item_missing
scenario:coreapiscenario-set_item
scenario:flasksimple-appsec-get
scenario:flasksimple-appsec-post
scenario:flasksimple-appsec-telemetry
scenario:flasksimple-baseline
scenario:flasksimple-debugger
scenario:flasksimple-iast-get
scenario:flasksimple-profiler
scenario:flasksimple-tracer
scenario:httppropagationinject-with_all
scenario:httppropagationinject-with_priority_and_origin
scenario:httppropagationinject-with_tags_invalid
scenario:httppropagationinject-with_tags_max_size
scenario:otelspan-start-finish
scenario:sethttpmeta-no-collectipvariant
scenario:sethttpmeta-obfuscation-no-query
scenario:sethttpmeta-useragentvariant_not_exists_1
scenario:tracer-large
scenario:tracer-medium
scenario:tracer-small
|
This can mostly be ignored, we cannot compare this against the previous... nothing actually got faster other than the test itself. The results from our benchmarking CI job is very different from what I get locally: CI:
Local:
|
@brettlangdon let me know when this is ready for review. As far as I can tell from the scrollback, you're still working on it? |
…unner (#8917) ## Checklist - [ ] Change(s) are motivated and described in the PR description - [ ] Testing strategy is described if automated tests are not included in the PR - [ ] Risks are described (performance impact, potential for breakage, maintainability) - [ ] Change is maintainable (easy to change, telemetry, documentation) - [ ] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed or label `changelog/no-changelog` is set - [ ] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)) - [ ] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [ ] If this PR changes the public interface, I've notified `@DataDog/apm-tees`. ## Reviewer Checklist - [ ] Title is accurate - [ ] All changes are related to the pull request's stated goal - [ ] Description motivates each change - [ ] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [ ] Testing strategy adequately addresses listed risks - [ ] Change is maintainable (easy to change, telemetry, documentation) - [ ] Release note makes sense to a user of the library - [ ] Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [ ] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
@emmettbutler this is now ready for review. |
…ead of gunicorn (#9253) Follow up from #8902 to also convert the `flask_sqli` benchmark to using the Flask test client instead of gunicorn. This cuts the benchmark runtime from 25min to 5min. We should be testing the same code paths, but we avoid the need to spin up a subprocess/server and make network requests to it. We also refactored some common bits from both `flask_simple` and `flask_sqli` to ensure we are configuring them the same way. This will look like a performance improvement, but it isn't. It is the test itself getting faster. ## Checklist - [x] Change(s) are motivated and described in the PR description - [x] Testing strategy is described if automated tests are not included in the PR - [x] Risks are described (performance impact, potential for breakage, maintainability) - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed or label `changelog/no-changelog` is set - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)) - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] If this PR changes the public interface, I've notified `@DataDog/apm-tees`. ## Reviewer Checklist - [ ] Title is accurate - [ ] All changes are related to the pull request's stated goal - [ ] Description motivates each change - [ ] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [ ] Testing strategy adequately addresses listed risks - [ ] Change is maintainable (easy to change, telemetry, documentation) - [ ] Release note makes sense to a user of the library - [ ] Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [ ] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
This change aims to simplify the Flask simple benchmark suite by using the Flask test client instead of using gunicorn to spin up a subprocess server + requests to make http requests to the server.
The primary goal was to simplify the code/coordination needed for the test, and to make the test suite faster.
The downside is we are moving away from a theoretical "end user experience" latest measurement to more of a "worse case" since we are removing network and server latency from the equation. However, removing these pieces should give us more stable numbers since there are less moving pieces.
If we choose to adopt this new approach then the existing historical trends/measurements will no longer be comparable.
Checklist
changelog/no-changelog
is set@DataDog/apm-tees
.Reviewer Checklist