Skip to content

fix(test-optimization): use a 10-second flush interval - #10018

Merged
juan-fernandez merged 1 commit into
masterfrom
juan-fernandez/use-10s-test-optimization-flush-interval
Aug 28, 2026
Merged

juan-fernandez merged 1 commit into
masterfrom
juan-fernandez/use-10s-test-optimization-flush-interval

Conversation

@juan-fernandez

@juan-fernandez juan-fernandez commented Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Changes the default Test Optimization periodic flush interval from 5 seconds to 10 seconds. Jest workers keep their existing zero interval.

Motivation

A longer periodic interval reduces small payload request frequency and gives the encoder more opportunity to batch events. The encoder size gate and final flush continue to send data independently of this interval.

This was extracted from #9987 so the two-line configuration change can be reviewed separately while #9987 remains the combined E2E validation branch. #10017 has merged, and this PR is now based directly on master.

Additional Notes

Verification:

  • 9 Test Optimization validation-initialization unit tests
  • ESLint and git diff --check

@dd-octo-sts

dd-octo-sts Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 8.42 MB
Deduped: 9.09 MB
No deduping: 9.09 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.3 | 125.43 kB | 445.14 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@datadog-official

datadog-official Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Tests

✅ All CI checks and tests passed. Datadog automation helped this PR pass.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 1 test - 1 passed on retry View in Datadog

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 98.59% (-0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: dac7e36 | Docs | View more details | Give us feedback!

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: PASS

More details

The default flush interval changes to 10 seconds. The Jest worker interval stays at zero, and the test expectation matches the source value.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit f2b1274 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@pr-commenter

pr-commenter Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-28 08:42:57

Comparing candidate commit dac7e36 in PR branch juan-fernandez/use-10s-test-optimization-flush-interval with baseline commit d140900 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2299 metrics, 11 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:appsec-appsec-enabled-20

  • unstable max_rss_usage [-18.115MB; +5.017MB] or [-10.424%; +2.887%]

scenario:appsec-iast-no-vulnerability-iast-enabled-default-config-20

  • unstable max_rss_usage [-17.229MB; +25.061MB] or [-7.591%; +11.041%]

scenario:appsec-iast-with-vulnerability-iast-enabled-default-config-20

  • unstable max_rss_usage [-21.370MB; +26.667MB] or [-5.787%; +7.222%]

scenario:debugger-line-probe-without-snapshot-26

  • unstable max_rss_usage [-12413.472KB; +14178.272KB] or [-4.689%; +5.355%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-229.552ms; +441.462ms] or [-4.763%; +9.160%]
  • unstable execution_time [-229.857ms; +446.378ms] or [-4.693%; +9.113%]
  • unstable throughput [-160090.638op/s; +82734.732op/s] or [-9.335%; +4.825%]

scenario:plugin-graphql-long-with-depth-on-max-20

  • unstable cpu_user_time [-734.448ms; +978.258ms] or [-6.351%; +8.459%]
  • unstable execution_time [-751.770ms; +999.545ms] or [-6.373%; +8.474%]
  • unstable throughput [-5.176op/s; +4.125op/s] or [-7.573%; +6.035%]

scenario:test-optimization-large-suite-20

  • unstable max_rss_usage [-4.188MB; +9.134MB] or [-5.125%; +11.179%]

@codecov

codecov Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.58%. Comparing base (d140900) to head (dac7e36).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10018      +/-   ##
==========================================
+ Coverage   91.95%   98.58%   +6.63%     
==========================================
  Files         973      991      +18     
  Lines      144660   149346    +4686     
  Branches    10796    12923    +2127     
==========================================
+ Hits       133021   147236   +14215     
+ Misses      11639     2110    -9529     
Flag Coverage Δ
aiguard 62.53% <ø> (-0.03%) ⬇️
aiguard-integration 59.13% <ø> (ø)
apm-bucket-0 61.97% <ø> (-0.03%) ⬇️
apm-bucket-1 67.54% <ø> (-0.03%) ⬇️
apm-bucket-2 67.12% <ø> (-0.03%) ⬇️
apm-bucket-3 63.78% <ø> (-0.03%) ⬇️
apm-capabilities-tracing 62.44% <ø> (ø)
apm-integrations-aerospike 59.78% <ø> (-0.03%) ⬇️
apm-integrations-confluentinc-kafka-javascript 66.10% <ø> (-0.03%) ⬇️
apm-integrations-couchbase 60.32% <ø> (-0.03%) ⬇️
apm-integrations-http 65.78% <ø> (-0.03%) ⬇️
apm-integrations-kafkajs 66.70% <ø> (-0.03%) ⬇️
apm-integrations-next 63.29% <ø> (?)
apm-integrations-prisma 61.39% <ø> (-0.03%) ⬇️
appsec 76.59% <ø> (-0.02%) ⬇️
appsec-express_fastify_graphql 73.03% <ø> (-0.02%) ⬇️
appsec-integration 49.23% <ø> (+<0.01%) ⬆️
appsec-kafka_ldapjs_lodash 67.05% <ø> (-0.03%) ⬇️
appsec-mongodb-core_mongoose_mysql 70.37% <ø> (-0.02%) ⬇️
appsec-next 56.62% <ø> (?)
appsec-node-serialize_passport_postgres 69.82% <ø> (-0.02%) ⬇️
appsec-sourcing_stripe_template 68.20% <ø> (?)
debugger 68.91% <ø> (?)
instrumentations-bucket-0 55.10% <ø> (-0.03%) ⬇️
instrumentations-bucket-1 63.63% <ø> (-0.03%) ⬇️
instrumentations-bucket-10 64.87% <ø> (-0.03%) ⬇️
instrumentations-bucket-11 65.53% <ø> (?)
instrumentations-bucket-12 54.98% <ø> (?)
instrumentations-bucket-13 55.27% <ø> (?)
instrumentations-bucket-14 55.10% <ø> (?)
instrumentations-bucket-2 56.19% <ø> (?)
instrumentations-bucket-3 57.02% <ø> (?)
instrumentations-bucket-4 63.08% <ø> (?)
instrumentations-bucket-5 49.31% <ø> (?)
instrumentations-bucket-6 64.97% <ø> (?)
instrumentations-bucket-7 55.24% <ø> (?)
instrumentations-bucket-8 62.45% <ø> (?)
instrumentations-bucket-9 57.84% <ø> (?)
instrumentations-instrumentation-couchbase 53.64% <ø> (?)
instrumentations-integration-esbuild 34.38% <ø> (ø)
llmobs-ai_anthropic_bedrock 66.35% <ø> (-0.02%) ⬇️
llmobs-bucket-1 64.46% <ø> (-0.03%) ⬇️
llmobs-openai 66.33% <ø> (-0.03%) ⬇️
llmobs-openai-agents_vertex-ai 63.50% <ø> (-0.03%) ⬇️
llmobs-sdk 75.77% <ø> (-0.03%) ⬇️
master-coverage 98.58% <ø> (?)
openfeature 59.75% <ø> (?)
openfeature-unit 57.48% <ø> (-0.03%) ⬇️
platform-core_esbuild_instrumentations-misc 40.52% <ø> (-0.02%) ⬇️
platform-integration 64.48% <ø> (ø)
platform-shimmer_unit-guardrails_webpack 38.25% <ø> (?)
plugins-browser-bunyan_bullmq_cassandra 65.76% <ø> (?)
plugins-bucket-0 60.38% <ø> (?)
plugins-bucket-1 57.66% <ø> (?)
plugins-bucket-11 66.26% <ø> (?)
plugins-bucket-18 65.78% <ø> (-0.03%) ⬇️
plugins-bucket-19 64.38% <ø> (?)
plugins-bucket-20 66.25% <ø> (-0.03%) ⬇️
plugins-bucket-4 60.57% <ø> (?)
plugins-cookie_cookie-parser_crypto 54.65% <ø> (-0.03%) ⬇️
plugins-fastify_fetch_fs 64.91% <ø> (?)
plugins-generic-pool_google-cloud-pubsub_grpc 68.54% <ø> (?)
plugins-handlebars_hapi_hono 62.97% <ø> (?)
plugins-ioredis_knex_langgraph 61.04% <ø> (?)
plugins-ldapjs_light-my-request_limitd-client 62.71% <ø> (-0.02%) ⬇️
plugins-lodash_mariadb_memcached 63.32% <ø> (-0.03%) ⬇️
plugins-moleculer_mongodb_mongodb-core 65.63% <ø> (?)
plugins-mongoose_multer_mysql 63.42% <ø> (?)
plugins-mysql2_nats_node-serialize 65.61% <ø> (-0.03%) ⬇️
plugins-opensearch_passport-http_pino 63.44% <ø> (-0.03%) ⬇️
plugins-postgres_process_pug 62.53% <ø> (?)
plugins-redis_router_sequelize 66.21% <ø> (?)
plugins-test-and-upstream-rhea_undici_url 65.57% <ø> (?)
plugins-valkey_vm_winston 61.84% <ø> (?)
plugins-ws 63.84% <ø> (-0.03%) ⬇️
profiling 65.87% <ø> (-0.03%) ⬇️
serverless-aws-sdk-aws-sdk 54.81% <ø> (?)
serverless-aws-sdk-base-inject-field 54.23% <ø> (?)
serverless-aws-sdk-bedrockruntime 57.53% <ø> (?)
serverless-aws-sdk-client 59.37% <ø> (?)
serverless-aws-sdk-dynamodb 58.49% <ø> (?)
serverless-aws-sdk-eventbridge 57.06% <ø> (-0.02%) ⬇️
serverless-aws-sdk-kinesis 62.58% <ø> (?)
serverless-aws-sdk-lambda 60.48% <ø> (?)
serverless-aws-sdk-s3 58.55% <ø> (-0.03%) ⬇️
serverless-aws-sdk-serverless-peer-service 63.15% <ø> (?)
serverless-aws-sdk-sns 63.49% <ø> (?)
serverless-aws-sdk-sqs 63.95% <ø> (?)
serverless-aws-sdk-stepfunctions 58.35% <ø> (?)
serverless-aws-sdk-util 54.90% <ø> (-0.03%) ⬇️
serverless-bucket-0 57.10% <ø> (ø)
serverless-bucket-1 63.11% <ø> (-0.03%) ⬇️
test-optimization-cucumber 70.41% <ø> (-0.03%) ⬇️
test-optimization-cypress 64.63% <ø> (?)
test-optimization-jest 72.03% <ø> (+<0.01%) ⬆️
test-optimization-mocha 71.88% <ø> (+0.05%) ⬆️
test-optimization-playwright-playwright-atr 59.50% <ø> (+0.01%) ⬆️
test-optimization-playwright-playwright-efd 60.18% <ø> (-0.02%) ⬇️
test-optimization-playwright-playwright-final-status 59.79% <ø> (?)
test-optimization-playwright-playwright-impacted-tests 59.90% <ø> (?)
test-optimization-playwright-playwright-reporting 60.92% <ø> (?)
test-optimization-playwright-playwright-test-management 61.12% <ø> (?)
test-optimization-playwright-playwright-test-span 59.54% <ø> (?)
test-optimization-selenium 58.59% <ø> (-0.13%) ⬇️
test-optimization-testopt 61.64% <ø> (?)
test-optimization-vitest 72.54% <ø> (+0.06%) ⬆️
test-optimization-vitest-browser 58.46% <ø> (?)
test-optimization-webdriverio 65.08% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@juan-fernandez
juan-fernandez force-pushed the juan-fernandez/use-10s-test-optimization-flush-interval branch from f2b1274 to f6a076a Compare August 27, 2026 12:43
@juan-fernandez

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: f6a076ada3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@juan-fernandez
juan-fernandez force-pushed the juan-fernandez/use-10s-test-optimization-flush-interval branch 4 times, most recently from 345b042 to 015f5c1 Compare August 27, 2026 14:27
Base automatically changed from juan-fernandez/report-test-suites-immediately to master August 28, 2026 08:29
@juan-fernandez
juan-fernandez force-pushed the juan-fernandez/use-10s-test-optimization-flush-interval branch from 015f5c1 to dac7e36 Compare August 28, 2026 08:31

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: FAIL

Older Agent paths can receive test and suite events in one trace. The new export path drops the full trace and loses the test event.

Open Bits AI session

🤖 Datadog Autotest · Commit 015f5c1 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@juan-fernandez

Copy link
Copy Markdown
Collaborator Author

@codex review

@juan-fernandez

Copy link
Copy Markdown
Collaborator Author

/datadog autotest review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: dac7e36c08

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: PASS

More details

This PR changes the default Test Optimization flush interval from 5 seconds to 10 seconds.
Jest workers keep the zero interval.
The current PR diff contains only this change and its test update.
The current base fixes the earlier mixed-trace event loss.
No open findings remain.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit dac7e36 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@juan-fernandez
juan-fernandez merged commit b874581 into master Aug 28, 2026
689 checks passed
@juan-fernandez
juan-fernandez deleted the juan-fernandez/use-10s-test-optimization-flush-interval branch August 28, 2026 10:21
This was referenced Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants