Skip to content

chore(eslint): reduce required export analysis - #10162

Open
BridgeAR wants to merge 1 commit into
masterfrom
BridgeAR/2026-09-04-eslint-export-cache
Open

chore(eslint): reduce required export analysis#10162
BridgeAR wants to merge 1 commit into
masterfrom
BridgeAR/2026-09-04-eslint-export-cache

Conversation

@BridgeAR

@BridgeAR BridgeAR commented Sep 4, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Adds bounded process-local reuse for required-export analysis and skips ordinary require() assignments before module resolution.

Motivation

Required-export checks reparsed unchanged first-party targets for each consumer.

A 256-consumer automatic-concurrency workload reduced aggregate CPU from 2.164 to 1.784 seconds. The additional fast path reduced aggregate CPU from 22.322 to 17.364 seconds on a 561-file cold workload.

Additional Notes

This does not use a disk cache.

Each consumer reparsed unchanged first-party targets because export analysis was scoped to one rule context. A 256-consumer automatic-concurrency workload reduced aggregate CPU from 2.164 to 1.784 seconds.

Skipping ordinary `require()` assignments before resolution reduced aggregate CPU from 22.322 to 17.364 seconds on a 561-file cold workload.

File identity metadata invalidates changed targets, and each worker retains at most 2,048 entries.
@dd-octo-sts

dd-octo-sts Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 8.77 MB
Deduped: 9.44 MB
No deduping: 9.44 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.4.0 | 127.33 kB | 447.04 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

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.64%. Comparing base (70758d0) to head (3985fc6).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10162      +/-   ##
==========================================
+ Coverage   91.10%   98.64%   +7.53%     
==========================================
  Files         970     1004      +34     
  Lines      138842   155851   +17009     
  Branches       59       74      +15     
==========================================
+ Hits       126490   153733   +27243     
+ Misses      12352     2118   -10234     
Flag Coverage Δ
ai-guard 64.87% <ø> (-0.07%) ⬇️
apm-capabilities 62.93% <ø> (+<0.01%) ⬆️
apm-integrations 81.31% <ø> (-0.06%) ⬇️
appsec 58.72% <ø> (-12.63%) ⬇️
debugger 69.62% <ø> (-0.03%) ⬇️
instrumentation 53.70% <ø> (?)
llmobs 78.93% <ø> (-0.07%) ⬇️
master-coverage 98.64% <ø> (?)
openfeature 66.32% <ø> (-0.03%) ⬇️
platform 69.15% <ø> (-0.01%) ⬇️
profiling 66.55% <ø> (-0.03%) ⬇️
serverless 65.60% <ø> (-0.05%) ⬇️
test-optimization 82.39% <ø> (?)

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.

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Sep 4, 2026

Copy link
Copy Markdown

Tests

⚠️ Warnings

⚠️ Your PR has warnings. Tests failed — unable to determine if these are from required jobs.

🧪 7 Tests failed in 3 jobs

AppSec | integration — ❌ 3 tests failed

View more details · View in GitHub Actions

❌ esbuild support for IAST cjs "before all" hook in "cjs" from cjs   View in Datadog
Command failed: npm install

Error: Command failed: npm install

    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:517:28)
    at maybeClose (node:internal/child_process:1098:16)
    at ChildProcess._handle.onexit (node:internal/child_process:303:5)
    at Process.callbackTrampoline (node:internal/async_hooks:128:17)
❌ esbuild support for IAST "before all" hook in "esbuild support for IAST" from esbuild support for IAST   View in Datadog
Timeout of 120000ms exceeded. For async tests and hooks, ensure &#34;done()&#34; is called; if returning a Promise, ensure it resolves. (/home/runner/work/dd-trace-js/dd-trace-js/integration-tests/appsec/iast-esbuild.spec.js)

Error: Timeout of 120000ms exceeded. For async tests and hooks, ensure &#34;done()&#34; is called; if returning a Promise, ensure it resolves. (/home/runner/work/dd-trace-js/dd-trace-js/integration-tests/appsec/iast-esbuild.spec.js)
    at listOnTimeout (node:internal/timers:581:17)
    at process.processTimers (node:internal/timers:519:7)
❌ esbuild support for IAST esm "before all" hook in "esm" from esm   View in Datadog
Command failed: npm install

Error: Command failed: npm install

    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:517:28)
    at maybeClose (node:internal/child_process:1098:16)
    at ChildProcess._handle.onexit (node:internal/child_process:303:5)
    at Process.callbackTrampoline (node:internal/async_hooks:128:17)
Instrumentation | integration-esbuild — ❌ 2 tests failed

View more details · View in GitHub Actions

❌ esbuild 0.16.12 "before all" hook for "works" from esbuild 0.16.12   View in Datadog
spawnSync /bin/sh ETIMEDOUT

Error: spawnSync /bin/sh ETIMEDOUT
    at Object.spawnSync (node:internal/child_process:1123:20)
    at spawnSync (node:child_process:877:24)
    at Object.execSync (node:child_process:958:15)
    at childProcess.execSync (integration-tests/coverage/patch-child-process.js:137:29)
    at execSync (integration-tests/esbuild/index.spec.js:18:10)
    at Context.&lt;anonymous&gt; (integration-tests/esbuild/index.spec.js:38:7)
    at Hook.patchedRunHook [as run] (packages/dd-trace/test/setup/mocha-hooks.js:53:30)
...
❌ esbuild latest "before all" hook for "works" from esbuild latest   View in Datadog
spawnSync /bin/sh ETIMEDOUT

Error: spawnSync /bin/sh ETIMEDOUT
    at Object.spawnSync (node:internal/child_process:1143:20)
    at spawnSync (node:child_process:911:24)
    at Object.execSync (node:child_process:992:15)
    at childProcess.execSync (integration-tests/coverage/patch-child-process.js:137:29)
    at execSync (integration-tests/esbuild/index.spec.js:18:10)
    at Context.&lt;anonymous&gt; (integration-tests/esbuild/index.spec.js:38:7)
    at Hook.patchedRunHook [as run] (packages/dd-trace/test/setup/mocha-hooks.js:53:30)
...
Instrumentation | integration-webpack — ❌ 2 tests failed

View more details · View in GitHub Actions

❌ webpack 5 "before all" hook for "works" from webpack 5   View in Datadog
spawnSync /bin/sh ETIMEDOUT

Error: spawnSync /bin/sh ETIMEDOUT
    at Object.spawnSync (node:internal/child_process:1117:20)
    at spawnSync (node:child_process:876:24)
    at Object.execSync (node:child_process:957:15)
    at execSync (integration-tests/webpack/index.spec.js:17:10)
    at Context.&lt;anonymous&gt; (integration-tests/webpack/index.spec.js:35:7)
    at Hook.patchedRunHook [as run] (packages/dd-trace/test/setup/mocha-hooks.js:53:30)
    at process.processImmediate (node:internal/timers:476:21)
❌ webpack 5.54.0 "before all" hook for "works" from webpack 5.54.0   View in Datadog
spawnSync /bin/sh ETIMEDOUT

Error: spawnSync /bin/sh ETIMEDOUT
    at Object.spawnSync (node:internal/child_process:1117:20)
    at spawnSync (node:child_process:876:24)
    at Object.execSync (node:child_process:957:15)
    at execSync (integration-tests/webpack/index.spec.js:17:10)
    at Context.&lt;anonymous&gt; (integration-tests/webpack/index.spec.js:35:7)
    at Hook.patchedRunHook [as run] (packages/dd-trace/test/setup/mocha-hooks.js:53:30)
    at process.processImmediate (node:internal/timers:476:21)

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 98.05% (+31.45%)

Useful? React with 👍 / 👎

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

@pr-commenter

pr-commenter Bot commented Sep 4, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-09-04 11:31:58

Comparing candidate commit 3985fc6 in PR branch BridgeAR/2026-09-04-eslint-export-cache with baseline commit 70758d0 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2300 metrics, 13 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:debugger-enabled-but-breakpoint-not-hit-20

  • unstable cpu_user_time [-369.007ms; +673.958ms] or [-3.972%; +7.254%]
  • unstable execution_time [-367.814ms; +670.667ms] or [-3.957%; +7.215%]
  • unstable throughput [-1777104.008op/s; +954969.077op/s] or [-6.585%; +3.539%]

scenario:debugger-line-probe-with-snapshot-default-20

  • unstable max_rss_usage [-6.820MB; +10.286MB] or [-4.488%; +6.769%]

scenario:encoders-0.4-immediate-flush-20

  • unstable max_rss_usage [-9.546MB; +4.066MB] or [-12.903%; +5.497%]

scenario:id-parse-128bit-20

  • unstable execution_time [-107.163ms; +164.659ms] or [-3.971%; +6.101%]

scenario:llmobs-encode-unicode-ascii-20

  • unstable cpu_usage_percentage [-7.666%; +4.928%]
  • unstable execution_time [-89.794ms; +145.820ms] or [-5.894%; +9.572%]
  • unstable throughput [-1342.630op/s; +818.605op/s] or [-8.461%; +5.159%]

scenario:llmobs-encode-unicode-mixed-20

  • unstable max_rss_usage [-9170.821KB; +9102.021KB] or [-11.990%; +11.900%]

scenario:plugin-aws-sdk-eventbridge-inject-detail-24

  • unstable execution_time [-280.410ms; +218.794ms] or [-5.675%; +4.428%]

scenario:plugin-graphql-long-with-depth-off-26

  • unstable max_rss_usage [-12.597MB; +42.689MB] or [-6.520%; +22.094%]

scenario:plugin-mongodb-core-binary-hash-20

  • unstable execution_time [-129.257ms; +199.819ms] or [-4.217%; +6.519%]

@BridgeAR
BridgeAR marked this pull request as ready for review September 4, 2026 16:09
@BridgeAR
BridgeAR requested review from a team as code owners September 4, 2026 16:09
@BridgeAR
BridgeAR requested a review from khanayan123 September 4, 2026 16:09
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.

1 participant