datadog-agent
datadog-agent copied to clipboard
Improved user experience when serverless benchmarks fail.
What does this PR do?
- Do not fail (ie add a :x:) to the action if something in it fails
- Provide some useful context to people looking for more help
Motivation
PR https://github.com/DataDog/datadog-agent/pull/22584 consistently fails the benchmarks. This is confusing and required the author to come talk with me directly. I wanna cut down that back and forth for people.
Additional Notes
Possible Drawbacks / Trade-offs
Describe how to test/QA your changes
Bloop Bleep... Dogbot Here
Regression Detector Results
Run ID: e0f05c92-1ce8-46ab-b972-22fd935abaad Baseline: d3c07fce4a0dc7eea2a79b9dd168c73c718f4cba Comparison: 899848825a44bf98de379eecb753abe4e2276a93 Total CPUs: 7
Performance changes are noted in the perf column of each table:
- ✅ = significantly better comparison variant performance
- ❌ = significantly worse comparison variant performance
- ➖ = no significant change in performance
No significant changes in experiment optimization goals
Confidence level: 90.00% Effect size tolerance: |Δ mean %| ≥ 5.00%
There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
Experiments ignored for regressions
Regressions in experiments with settings containing erratic: true
are ignored.
perf | experiment | goal | Δ mean % | Δ mean % CI |
---|---|---|---|---|
➖ | file_to_blackhole | % cpu utilization | -0.41 | [-6.96, +6.14] |
Fine details of change detection per experiment
perf | experiment | goal | Δ mean % | Δ mean % CI |
---|---|---|---|---|
➖ | otel_to_otel_logs | ingress throughput | +1.24 | [+0.63, +1.84] |
➖ | tcp_syslog_to_blackhole | ingress throughput | +1.10 | [+1.04, +1.15] |
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | +0.87 | [-0.57, +2.31] |
➖ | process_agent_real_time_mode | memory utilization | +0.28 | [+0.25, +0.31] |
➖ | file_tree | memory utilization | +0.13 | [+0.05, +0.22] |
➖ | trace_agent_msgpack | ingress throughput | +0.01 | [-0.00, +0.02] |
➖ | uds_dogstatsd_to_api | ingress throughput | +0.00 | [-0.00, +0.00] |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.00 | [-0.00, +0.00] |
➖ | trace_agent_json | ingress throughput | -0.03 | [-0.06, +0.01] |
➖ | idle | memory utilization | -0.19 | [-0.22, -0.17] |
➖ | process_agent_standard_check_with_stats | memory utilization | -0.25 | [-0.28, -0.21] |
➖ | file_to_blackhole | % cpu utilization | -0.41 | [-6.96, +6.14] |
➖ | process_agent_standard_check | memory utilization | -0.47 | [-0.51, -0.43] |
Explanation
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
[Fast Unit Tests Report]
On pipeline 32867545 (CI Visibility). The following jobs did not run any unit tests:
Jobs:
- tests_deb-arm64-py3
- tests_deb-x64-py3
- tests_flavor_dogstatsd_deb-x64
- tests_flavor_heroku_deb-x64
- tests_flavor_iot_deb-x64
- tests_rpm-arm64-py3
- tests_rpm-x64-py3
- tests_windows-x64
If you modified Go files and expected unit tests to run in these jobs, please double check the job logs. If you think tests should have been executed reach out to #agent-developer-experience
Serverless Benchmark Results
BenchmarkStartEndInvocation
comparison between 1fad7d72c6002ac689418c65f6c6c560a6c33608 and e4b92863e3f11de70293463cedabf3629357f4bd.
tl;dr
Use these benchmarks as an insight tool during development.
-
Skim down the
vs base
column in each chart. If there is a~
, then there was no statistically significant change to the benchmark. Otherwise, ensure the estimated percent change is either negative or very small. -
The last row of each chart is the
geomean
. Ensure this percentage is either negative or very small.
What is this benchmarking?
The BenchmarkStartEndInvocation
compares the amount of time it takes to call the start-invocation
and end-invocation
endpoints. For universal instrumentation languages (Dotnet, Golang, Java, Ruby), this represents the majority of the duration overhead added by our tracing layer.
The benchmark is run using a large variety of lambda request payloads. In the charts below, there is one row for each event payload type.
How do I interpret these charts?
The charts below comes from benchstat
. They represent the statistical change in duration (sec/op), memory overhead (B/op), and allocations (allocs/op).
The benchstat docs explain how to interpret these charts.
Before the comparison table, we see common file-level configuration. If there are benchmarks with different configuration (for example, from different packages), benchstat will print separate tables for each configuration.
The table then compares the two input files for each benchmark. It shows the median and 95% confidence interval summaries for each benchmark before and after the change, and an A/B comparison under "vs base". ... The p-value measures how likely it is that any differences were due to random chance (i.e., noise). The "~" means benchstat did not detect a statistically significant difference between the two inputs. ...
Note that "statistically significant" is not the same as "large": with enough low-noise data, even very small changes can be distinguished from noise and considered statistically significant. It is, of course, generally easier to distinguish large changes from noise.
Finally, the last row of the table shows the geometric mean of each column, giving an overall picture of how the benchmarks changed. Proportional changes in the geomean reflect proportional changes in the benchmarks. For example, given n benchmarks, if sec/op for one of them increases by a factor of 2, then the sec/op geomean will increase by a factor of ⁿ√2.
I need more help
First off, do not worry if the benchmarks are failing. They are not tests. The intention is for them to be a tool for you to use during development.
If you would like a hand interpreting the results come chat with us in #serverless-agent
in the internal DataDog slack or in #serverless
in the public DataDog slack. We're happy to help!
Benchmark stats
goos: linux
goarch: amd64
pkg: github.com/DataDog/datadog-agent/pkg/serverless/daemon
cpu: AMD EPYC 7763 64-Core Processor
│ baseline/benchmark.log │ current/benchmark.log │
│ sec/op │ sec/op vs base │
api-gateway-appsec.json 87.87µ ± 4% 84.38µ ± 14% -3.97% (p=0.029 n=10)
api-gateway-kong-appsec.json 69.27µ ± 2% 66.97µ ± 1% -3.33% (p=0.000 n=10)
api-gateway-kong.json 68.03µ ± 1% 65.32µ ± 1% -3.97% (p=0.000 n=10)
api-gateway-non-proxy-async.json 107.2µ ± 1% 102.6µ ± 2% -4.33% (p=0.000 n=10)
api-gateway-non-proxy.json 107.8µ ± 3% 104.1µ ± 2% -3.48% (p=0.000 n=10)
api-gateway-websocket-connect.json 71.46µ ± 1% 69.06µ ± 1% -3.36% (p=0.000 n=10)
api-gateway-websocket-default.json 64.62µ ± 2% 62.20µ ± 1% -3.74% (p=0.000 n=10)
api-gateway-websocket-disconnect.json 64.10µ ± 1% 61.31µ ± 3% -4.35% (p=0.000 n=10)
api-gateway.json 117.5µ ± 1% 113.5µ ± 1% -3.37% (p=0.000 n=10)
application-load-balancer.json 64.69µ ± 2% 62.54µ ± 1% -3.33% (p=0.000 n=10)
cloudfront.json 49.11µ ± 3% 47.10µ ± 2% -4.08% (p=0.000 n=10)
cloudwatch-events.json 39.48µ ± 2% 38.01µ ± 1% -3.71% (p=0.000 n=10)
cloudwatch-logs.json 67.07µ ± 1% 64.62µ ± 2% -3.65% (p=0.000 n=10)
custom.json 31.13µ ± 4% 30.49µ ± 1% -2.05% (p=0.000 n=10)
dynamodb.json 95.68µ ± 1% 92.17µ ± 1% -3.66% (p=0.000 n=10)
empty.json 29.77µ ± 2% 28.60µ ± 1% -3.95% (p=0.000 n=10)
eventbridge-custom.json 43.15µ ± 2% 41.65µ ± 2% -3.48% (p=0.000 n=10)
http-api.json 74.93µ ± 1% 72.53µ ± 2% -3.20% (p=0.000 n=10)
kinesis-batch.json 73.83µ ± 1% 69.93µ ± 1% -5.27% (p=0.000 n=10)
kinesis.json 55.60µ ± 2% 53.50µ ± 2% -3.78% (p=0.000 n=10)
s3.json 60.09µ ± 2% 58.70µ ± 1% -2.31% (p=0.000 n=10)
sns-batch.json 92.36µ ± 1% 88.70µ ± 2% -3.96% (p=0.000 n=10)
sns.json 65.61µ ± 2% 64.30µ ± 1% -2.00% (p=0.001 n=10)
snssqs.json 113.3µ ± 2% 109.3µ ± 2% -3.56% (p=0.000 n=10)
snssqs_no_dd_context.json 102.20µ ± 3% 96.51µ ± 2% -5.57% (p=0.000 n=10)
sqs-aws-header.json 56.35µ ± 2% 54.32µ ± 2% -3.61% (p=0.000 n=10)
sqs-batch.json 97.78µ ± 2% 93.66µ ± 2% -4.21% (p=0.000 n=10)
sqs.json 71.33µ ± 2% 67.66µ ± 2% -5.14% (p=0.000 n=10)
sqs_no_dd_context.json 63.77µ ± 3% 61.66µ ± 3% -3.31% (p=0.011 n=10)
geomean 68.53µ 65.98µ -3.72%
│ baseline/benchmark.log │ current/benchmark.log │
│ B/op │ B/op vs base │
api-gateway-appsec.json 37.20Ki ± 0% 37.19Ki ± 0% ~ (p=0.255 n=10)
api-gateway-kong-appsec.json 26.80Ki ± 0% 26.79Ki ± 0% ~ (p=0.590 n=10)
api-gateway-kong.json 24.29Ki ± 0% 24.28Ki ± 0% ~ (p=0.424 n=10)
api-gateway-non-proxy-async.json 48.00Ki ± 0% 47.99Ki ± 0% ~ (p=0.516 n=10)
api-gateway-non-proxy.json 47.20Ki ± 0% 47.20Ki ± 0% ~ (p=0.564 n=10)
api-gateway-websocket-connect.json 25.40Ki ± 0% 25.40Ki ± 0% ~ (p=0.304 n=10)
api-gateway-websocket-default.json 21.31Ki ± 0% 21.30Ki ± 0% ~ (p=0.100 n=10)
api-gateway-websocket-disconnect.json 21.08Ki ± 0% 21.08Ki ± 0% ~ (p=0.811 n=10)
api-gateway.json 49.46Ki ± 0% 49.45Ki ± 0% ~ (p=0.066 n=10)
application-load-balancer.json 23.17Ki ± 0% 23.17Ki ± 0% -0.03% (p=0.041 n=10)
cloudfront.json 17.58Ki ± 0% 17.59Ki ± 0% ~ (p=0.698 n=10)
cloudwatch-events.json 11.65Ki ± 0% 11.64Ki ± 0% -0.11% (p=0.015 n=10)
cloudwatch-logs.json 53.29Ki ± 0% 53.27Ki ± 0% ~ (p=0.093 n=10)
custom.json 9.661Ki ± 0% 9.665Ki ± 0% ~ (p=0.985 n=10)
dynamodb.json 40.62Ki ± 0% 40.59Ki ± 0% ~ (p=0.101 n=10)
empty.json 9.219Ki ± 0% 9.217Ki ± 0% ~ (p=0.897 n=10)
eventbridge-custom.json 13.38Ki ± 0% 13.35Ki ± 0% -0.24% (p=0.001 n=10)
http-api.json 23.67Ki ± 0% 23.69Ki ± 0% ~ (p=0.684 n=10)
kinesis-batch.json 26.98Ki ± 0% 26.93Ki ± 0% -0.18% (p=0.005 n=10)
kinesis.json 17.75Ki ± 0% 17.75Ki ± 0% ~ (p=0.197 n=10)
s3.json 20.27Ki ± 0% 20.28Ki ± 0% ~ (p=0.753 n=10)
sns-batch.json 38.57Ki ± 0% 38.56Ki ± 0% ~ (p=0.631 n=10)
sns.json 23.92Ki ± 0% 23.86Ki ± 0% -0.27% (p=0.016 n=10)
snssqs.json 50.63Ki ± 0% 50.55Ki ± 0% -0.16% (p=0.001 n=10)
snssqs_no_dd_context.json 44.81Ki ± 0% 44.74Ki ± 0% -0.14% (p=0.027 n=10)
sqs-aws-header.json 18.80Ki ± 0% 18.79Ki ± 0% ~ (p=0.927 n=10)
sqs-batch.json 41.58Ki ± 0% 41.55Ki ± 0% ~ (p=0.149 n=10)
sqs.json 25.46Ki ± 0% 25.41Ki ± 1% ~ (p=0.218 n=10)
sqs_no_dd_context.json 20.64Ki ± 0% 20.64Ki ± 0% ~ (p=1.000 n=10)
geomean 25.67Ki 25.66Ki -0.06%
│ baseline/benchmark.log │ current/benchmark.log │
│ allocs/op │ allocs/op vs base │
api-gateway-appsec.json 630.0 ± 0% 629.0 ± 0% ~ (p=0.370 n=10)
api-gateway-kong-appsec.json 488.0 ± 0% 488.0 ± 0% ~ (p=1.000 n=10) ¹
api-gateway-kong.json 466.0 ± 0% 466.0 ± 0% ~ (p=1.000 n=10) ¹
api-gateway-non-proxy-async.json 725.0 ± 0% 725.0 ± 0% ~ (p=1.000 n=10)
api-gateway-non-proxy.json 716.0 ± 0% 716.0 ± 0% ~ (p=0.211 n=10)
api-gateway-websocket-connect.json 453.0 ± 0% 453.0 ± 0% ~ (p=1.000 n=10) ¹
api-gateway-websocket-default.json 379.0 ± 0% 379.0 ± 0% ~ (p=1.000 n=10) ¹
api-gateway-websocket-disconnect.json 369.0 ± 0% 369.0 ± 0% ~ (p=1.000 n=10)
api-gateway.json 790.0 ± 0% 790.0 ± 0% ~ (p=0.087 n=10)
application-load-balancer.json 353.0 ± 0% 352.0 ± 0% ~ (p=0.070 n=10)
cloudfront.json 283.0 ± 0% 283.5 ± 0% ~ (p=0.650 n=10)
cloudwatch-events.json 220.0 ± 0% 220.0 ± 0% ~ (p=0.474 n=10)
cloudwatch-logs.json 215.0 ± 0% 215.0 ± 0% ~ (p=1.000 n=10)
custom.json 168.0 ± 0% 168.0 ± 0% ~ (p=1.000 n=10)
dynamodb.json 589.0 ± 0% 588.0 ± 0% ~ (p=0.270 n=10)
empty.json 159.0 ± 1% 159.0 ± 1% ~ (p=1.000 n=10)
eventbridge-custom.json 254.0 ± 0% 253.0 ± 0% -0.39% (p=0.003 n=10)
http-api.json 432.0 ± 0% 432.0 ± 0% ~ (p=0.760 n=10)
kinesis-batch.json 390.0 ± 0% 390.0 ± 0% ~ (p=0.115 n=10)
kinesis.json 285.0 ± 0% 285.0 ± 0% ~ (p=1.000 n=10)
s3.json 357.0 ± 0% 357.0 ± 0% ~ (p=0.916 n=10)
sns-batch.json 455.0 ± 0% 454.0 ± 0% ~ (p=0.285 n=10)
sns.json 323.0 ± 0% 322.0 ± 0% ~ (p=0.094 n=10)
snssqs.json 446.0 ± 0% 444.5 ± 0% -0.34% (p=0.019 n=10)
snssqs_no_dd_context.json 399.5 ± 0% 398.5 ± 0% -0.25% (p=0.041 n=10)
sqs-aws-header.json 273.5 ± 0% 274.0 ± 0% ~ (p=0.722 n=10)
sqs-batch.json 503.5 ± 0% 503.0 ± 0% ~ (p=0.282 n=10)
sqs.json 350.5 ± 0% 349.5 ± 1% ~ (p=0.164 n=10)
sqs_no_dd_context.json 324.0 ± 0% 324.0 ± 0% ~ (p=0.999 n=10)
geomean 376.4 376.1 -0.07%
¹ all samples are equal
/merge
:steam_locomotive: MergeQueue
Pull request added to the queue.
This build is going to start soon! (estimated merge in less than 23m)
Use /merge -c
to cancel this operation!