datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

add experimental E2E command runner

Open clarkb7 opened this issue 11 months ago • 1 comments

What does this PR do?

Adds a command that can connect to E2E RemoteHosts to run one-off snippets or common tasks.

Motivation

It is helpful during testing/debugging to be able run certain E2E operations and other helper functions without having to create a special temporary one-off "test" to run, only to remove it before committing your code.

Example scenario: your installer test fails in the middle and leaves the agent installed on the host. You can run this command to uninstall the agent and then re-run your test.

go run ./tests/windows/cmd/run --host 10.1.59.199 agent uninstall --remove-config

I envision it being helpful to automate things like enable/collect crash dumps, event logs, and other things we might develop for E2E tests that would be helpful to be able to run independently of an E2E test.

Additional Notes

Possible Drawbacks / Trade-offs

Go does not provide a way to use "reflect" to call package level functions by their names so there's not really a good way to support calling arbitrary helper functions with arbitrary arguments. Each helper needs to be implemented by a cobra cmd.

Describe how to test/QA your changes

clarkb7 avatar Mar 08 '24 01:03 clarkb7

Bloop Bleep... Dogbot Here

Regression Detector Results

Run ID: 453aaa47-c357-4173-9903-c185dab1605c Baseline: c221f839802de34c89f5b6454a7e2ac675863ea5 Comparison: 4c6a030645c05c4c91fbcba1fad33acf59b7250d

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.44 [-6.11, +6.99]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
basic_py_check % cpu utilization +2.36 [+0.08, +4.63]
otel_to_otel_logs ingress throughput +0.74 [+0.10, +1.38]
file_to_blackhole % cpu utilization +0.44 [-6.11, +6.99]
process_agent_standard_check memory utilization +0.18 [+0.15, +0.21]
tcp_syslog_to_blackhole ingress throughput +0.16 [+0.10, +0.22]
trace_agent_json ingress throughput +0.02 [+0.00, +0.05]
trace_agent_msgpack ingress throughput +0.00 [-0.00, +0.01]
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.00, +0.00]
uds_dogstatsd_to_api ingress throughput -0.00 [-0.00, +0.00]
process_agent_standard_check_with_stats memory utilization -0.04 [-0.07, -0.02]
idle memory utilization -0.11 [-0.14, -0.07]
process_agent_real_time_mode memory utilization -0.33 [-0.36, -0.30]
file_tree memory utilization -0.56 [-0.62, -0.49]
uds_dogstatsd_to_api_cpu % cpu utilization -0.63 [-2.05, +0.80]

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:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. 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.

  3. Its configuration does not mark it "erratic".

pr-commenter[bot] avatar Mar 08 '24 02:03 pr-commenter[bot]