Skip to content

fix(core): show performance report recommendations only when actionable - #36344

Merged
FrozenPandaz merged 2 commits into
masterfrom
feat/perf-report-recommendation-thresholds
Jul 14, 2026
Merged

fix(core): show performance report recommendations only when actionable#36344
FrozenPandaz merged 2 commits into
masterfrom
feat/perf-report-recommendation-thresholds

Conversation

@FrozenPandaz

Copy link
Copy Markdown
Contributor

Current Behavior

The performance report prints recommendations on every run, no matter how fast the run was — a 2-second run can be told to increase parallelism, set up remote caching, or split its longest tasks. The "Speed up or split the longest tasks on the critical path" list includes tasks that barely contribute to the path (a task that is 5% of the path is listed alongside one that is 75%). And workspaces that opted out of Nx Cloud via neverConnectToCloud (or NX_NO_CLOUD) still get Nx Cloud recommendations — in fact the opt-out makes the remote-cache CTA more likely, because isNxCloudUsed() returning false looks like "cold cache with no remote → recommend Nx Cloud".

Expected Behavior

Recommendations only appear when they are actionable:

  • Runs under 30 seconds show stats only — no recommendations (terminal report, GitHub Actions job summary, and TUI popup alike).
  • The critical-path speed-up list only includes tasks that are at least 20% of the critical path; shorter tasks are noise, not speed-up targets.
  • Workspaces with neverConnectToCloud / NX_NO_CLOUD set never see the Nx Cloud recommendations (the remote-cache CTA and "Distribute across machines with Nx Agents"). Local advice (raise --parallel, drop --skip-nx-cache, speed up the longest tasks) still appears.

The e2e report normalizer now strips the Recommendations section (and the release/lerna snapshots drop it), so snapshots stay stable whether a run finishes under or over the 30s floor.

Related Issue(s)

N/A


View session information ↗

- Skip all recommendations when the run took under 30s (already fast)
- Drop critical-path tasks under 20% of the path from the speed-up list
- Never recommend Nx Cloud (remote cache CTA, Nx Agents) when the workspace
  opted out via neverConnectToCloud / NX_NO_CLOUD
- Strip the Recommendations section in e2e report normalization so fast e2e
  runs (no recs) and slow ones (recs reappear) snapshot identically
@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 90d9e00
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6a56a8f484a23d0007d296ac
😎 Deploy Preview https://deploy-preview-36344--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit 90d9e00
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/6a56a8f4bda810000853c22a
😎 Deploy Preview https://deploy-preview-36344--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud

nx-cloud Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit e797dec

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 8m 3s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 4s View ↗
nx-cloud record -- pnpm nx-cloud conformance:check ✅ Succeeded 1m 3s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 18s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 7s View ↗

☁️ Nx Cloud last updated this comment at 2026-07-14 21:36:50 UTC

@nx-cloud nx-cloud Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nx Cloud has identified a flaky task in your failed CI:

🔂 Since the failure was identified as flaky, we triggered a CI rerun by adding an empty commit to this branch.

Nx Cloud View detailed reasoning in Nx Cloud ↗


🎓 Learn more about Self-Healing CI on nx.dev

@FrozenPandaz
FrozenPandaz marked this pull request as ready for review July 14, 2026 22:01
@FrozenPandaz
FrozenPandaz requested a review from a team as a code owner July 14, 2026 22:01
@FrozenPandaz
FrozenPandaz requested a review from JamesHenry July 14, 2026 22:01
@FrozenPandaz
FrozenPandaz merged commit f00e9a8 into master Jul 14, 2026
18 checks passed
@FrozenPandaz
FrozenPandaz deleted the feat/perf-report-recommendation-thresholds branch July 14, 2026 22:03
FrozenPandaz added a commit that referenced this pull request Jul 20, 2026
…le (#36344)

## Current Behavior

The performance report prints recommendations on every run, no matter
how fast the run was — a 2-second run can be told to increase
parallelism, set up remote caching, or split its longest tasks. The
"Speed up or split the longest tasks on the critical path" list includes
tasks that barely contribute to the path (a task that is 5% of the path
is listed alongside one that is 75%). And workspaces that opted out of
Nx Cloud via `neverConnectToCloud` (or `NX_NO_CLOUD`) still get Nx Cloud
recommendations — in fact the opt-out makes the remote-cache CTA *more*
likely, because `isNxCloudUsed()` returning false looks like "cold cache
with no remote → recommend Nx Cloud".

## Expected Behavior

Recommendations only appear when they are actionable:

- Runs under 30 seconds show stats only — no recommendations (terminal
report, GitHub Actions job summary, and TUI popup alike).
- The critical-path speed-up list only includes tasks that are at least
20% of the critical path; shorter tasks are noise, not speed-up targets.
- Workspaces with `neverConnectToCloud` / `NX_NO_CLOUD` set never see
the Nx Cloud recommendations (the remote-cache CTA and "Distribute
across machines with Nx Agents"). Local advice (raise `--parallel`, drop
`--skip-nx-cache`, speed up the longest tasks) still appears.

The e2e report normalizer now strips the Recommendations section (and
the release/lerna snapshots drop it), so snapshots stay stable whether a
run finishes under or over the 30s floor.

## Related Issue(s)

N/A

<!-- polygraph-session-start -->
---
[View session information
↗](https://app.trypolygraph.com/orgs/6a061dcb561c062131116eca/sessions/Performance-report-only-show-actionable-recommendations-d9fb2765)
<!-- polygraph-session-end -->

---------

Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>
(cherry picked from commit f00e9a8)
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