Skip to content

Conversation

@BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Jan 14, 2026

Related to #1197

This PR includes:

  • Add Profiler class
  • Add API methods setEnabled, isEnabled, tracks, marker, measure, measureAsync
const profiler = new Profiler({
  prefix: 'cp',
  track: 'Main',
  trackGroup: `<✓> Code PushUp - ${serializeCommandWithArgs({
        command: process.argv[2] || 'unknown',
        args: process.argv.slice(3),
 })}`,
 color: 'primary-dark',
 error: e => ({
    properties: [['Stack Track', (e as Error)?.stack || 'Unknown']],
  }),
 tracks: {
   main: {
      track: 'Main',
    },
    pluginEslint: {
      track: 'Plugins Eslint',
      ...pluginColors,
    },
    pluginCoverage: {
      track: 'Plugins Coverage',
      ...pluginColors,
    },
    pluginAxe: {
      track: 'Plugins Axe',
      ...pluginColors,
    },
  },
});

profiler.marker('Start Profiling', {
  tooltipText: 'Cache cleared due to stale data'
});

const result = profiler.measure('plugin-eslint:merge-results', () => eslintPlugin.mergeResults(results), {
    ...profiler.tracks.eslintPlugin
    color: 'secondary'
  });

const asyncResult = await profiler.measureAsync('cli:load-rc-file',
  () => api.saveData(data), {
    ...profiler.tracks.main
    color: 'primary'
  }
);

@nx-cloud
Copy link

nx-cloud bot commented Jan 14, 2026

View your CI Pipeline Execution ↗ for commit 64457f3

Command Status Duration Result
nx run ci:code-pushup -- merge-diffs --files=/h... ✅ Succeeded 5s View ↗
nx run-many --targets=code-pushup --parallel=fa... ✅ Succeeded 1m 23s View ↗
nx run-many --targets=code-pushup --parallel=fa... ✅ Succeeded 12m 22s View ↗
nx run-many -t unit-test,int-test ✅ Succeeded 1m 17s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-14 22:22:20 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 14, 2026

Open in StackBlitz

@code-pushup/ci

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/ci@1216

@code-pushup/cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/cli@1216

@code-pushup/core

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/core@1216

@code-pushup/create-cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/create-cli@1216

@code-pushup/models

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/models@1216

@code-pushup/nx-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/nx-plugin@1216

@code-pushup/axe-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/axe-plugin@1216

@code-pushup/eslint-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/eslint-plugin@1216

@code-pushup/coverage-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/coverage-plugin@1216

@code-pushup/js-packages-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/js-packages-plugin@1216

@code-pushup/jsdocs-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/jsdocs-plugin@1216

@code-pushup/lighthouse-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/lighthouse-plugin@1216

@code-pushup/typescript-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/typescript-plugin@1216

@code-pushup/utils

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/utils@1216

commit: 64457f3

@github-actions
Copy link
Contributor

github-actions bot commented Jan 14, 2026

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 8db4c55 with previous commit 316407b.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Documentation 🔴 34 🔴 38 ↑ +4.3
Performance 🔴 35 🔴 33 ↓ −2.6
Code coverage 🟢 92 🟢 93 ↑ +0.1
Bug prevention 🟡 75 🟡 75 ↓ −0.1
Axe Accessibility 🟡 88 🟡 88 ↓ −0.1
Code style 🟢 99 🟢 99
Security 🟡 51 🟡 51
Updates 🟡 78 🟡 78
Type Safety 🟡 67 🟡 67
Miscellaneous 🟡 67 🟡 67
Accessibility 🟢 92 🟢 92
Best Practices 🟢 100 🟢 100
SEO 🟢 92 🟢 92
👍 2 groups improved, 👎 1 group regressed, 👍 8 audits improved, 👎 4 audits regressed, 15 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
JSDocs coverage Documentation coverage 🔴 34 🔴 38 ↑ +4.3
Lighthouse Performance 🔴 35 🔴 33 ↓ −2.6
Code coverage Code coverage metrics 🟢 92 🟢 93 ↑ +0.1

31 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Lighthouse Speed Index 🟥 6.5 s 🟥 7.4 s ↑ +13.7 %
JSDocs coverage Methods coverage 🟥 13 undocumented methods 🟨 13 undocumented methods  +0 %
Lighthouse First Contentful Paint 🟥 3.1 s 🟥 3.4 s ↑ +9.8 %
JSDocs coverage Types coverage 🟥 265 undocumented types 🟥 265 undocumented types  +0 %
JSDocs coverage Classes coverage 🟥 7 undocumented classes 🟥 7 undocumented classes  +0 %
JSDocs coverage Variables coverage 🟥 275 undocumented variables 🟥 276 undocumented variables ↑ +0.4 %
Lighthouse Total Blocking Time 🟥 2,280 ms 🟥 2,470 ms ↑ +8.8 %
Lighthouse Time to Interactive 🟥 14.0 s 🟥 14.1 s ↑ +0.8 %
Code coverage Line coverage 🟩 92.7 % 🟩 92.8 % ↑ +0.2 %
JSDocs coverage Functions coverage 🟥 591 undocumented functions 🟥 591 undocumented functions  +0 %
Code coverage Function coverage 🟩 94.2 % 🟩 94.3 % ↑ +0.1 %
Code coverage Branch coverage 🟨 89 % 🟨 89 % ↑ +0.1 %
Lighthouse Minimizes main-thread work 🟥 10.8 s 🟥 12.3 s ↑ +14.4 %
Lighthouse JavaScript execution time 🟥 5.7 s 🟥 6.3 s ↑ +10.8 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 95 KiB 🟥 Potential savings of 95 KiB ↑ +300 %
Lighthouse Reduce unused JavaScript 🟥 Potential savings of 220 KiB 🟥 Potential savings of 223 KiB ↑ +34.4 %
Lighthouse Max Potential First Input Delay 🟥 1,470 ms 🟥 1,730 ms ↑ +17.8 %
Lighthouse Largest Contentful Paint 🟥 12.3 s 🟥 12.5 s ↑ +1.9 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,114 KiB 🟩 Total size was 2,114 KiB ↓ −0.1 %
Lighthouse Uses efficient cache policy on static assets 🟨 31 resources found 🟨 31 resources found ↑ +0.1 %
Lighthouse Remove duplicate modules in JavaScript bundles 🟥 Potential savings of 91 KiB 🟥 Potential savings of 99 KiB ↑ +33.3 %
Lighthouse Metrics 🟩 100% 🟩 100% ↑ +0.8 %
Lighthouse Server Backend Latencies 🟩 1,400 ms 🟩 1,320 ms ↓ −6.1 %
Lighthouse Initial server response time was short 🟥 Root document took 670 ms 🟥 Root document took 630 ms ↓ −4.9 %
Lighthouse Network Round Trip Times 🟩 70 ms 🟩 70 ms ↓ −8.2 %
JSDocs coverage Properties coverage 🟥 23 undocumented properties 🟥 27 undocumented properties ↑ +17.4 %
JS packages Vulnerabilities for npm dev dependencies. 🟥 40 vulnerabilities (3 critical, 23 high, 8 moderate, 6 low) 🟥 43 vulnerabilities (3 critical, 23 high, 8 moderate, 9 low) ↑ +7.5 %

652 other audits are unchanged.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 14, 2026

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit 8db4c55 with previous commit 316407b.

💼 Project utils

🤨 Code PushUp report has both improvements and regressions.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Documentation 🔴 37 🔴 44 ↑ +6.9
Code coverage 🟢 95 🟢 95 ↑ +0.1

4 other categories are unchanged.

👍 2 groups improved, 👍 7 audits improved, 👎 1 audit regressed, 1 audit changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
JSDocs coverage Documentation coverage 🔴 37 🔴 44 ↑ +6.9
Code coverage Code coverage metrics 🟢 95 🟢 95 ↑ +0.1

13 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
JSDocs coverage Variables coverage 🟥 47 undocumented variables 🟥 48 undocumented variables ↑ +2.1 %
JSDocs coverage Types coverage 🟥 64 undocumented types 🟥 64 undocumented types  +0 %
JSDocs coverage Methods coverage 🟥 13 undocumented methods 🟨 13 undocumented methods  +0 %
JSDocs coverage Classes coverage 🟥 4 undocumented classes 🟥 4 undocumented classes  +0 %
JSDocs coverage Functions coverage 🟥 240 undocumented functions 🟥 240 undocumented functions  +0 %
Code coverage Function coverage 🟩 96 % 🟩 96.2 % ↑ +0.2 %
Code coverage Line coverage 🟩 97.6 % 🟩 97.8 % ↑ +0.2 %
Code coverage Branch coverage 🟩 92 % 🟩 91.9 % ↓ −0.1 %
JSDocs coverage Properties coverage 🟥 23 undocumented properties 🟥 27 undocumented properties ↑ +17.4 %

435 other audits are unchanged.


13 other projects are unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants