Skip to content

feat(js-x-ray): return executionTime in AstAnalyser report#574

Merged
fraxken merged 4 commits intoNodeSecure:masterfrom
cskwork:feat/issue-572-ast-analyser-execution-time
Mar 23, 2026
Merged

feat(js-x-ray): return executionTime in AstAnalyser report#574
fraxken merged 4 commits intoNodeSecure:masterfrom
cskwork:feat/issue-572-ast-analyser-execution-time

Conversation

@cskwork
Copy link
Copy Markdown
Contributor

@cskwork cskwork commented Mar 22, 2026

Summary

Fixes #572

Adds executionTime (in milliseconds) to the AstAnalyser report, enabling higher-level APIs to trace performance issues.

Changes

  • Added executionTime field to Report and ReportOnFile interfaces
  • Measured execution time using performance.now() in analyse(), analyseFile(), and analyseFileSync()
  • Execution time is captured in both success and error paths for analyseFile/analyseFileSync

Test plan

  • Added 5 new tests verifying executionTime is a non-negative number across all methods
  • All 71 existing + new tests pass
  • TypeScript build passes

Add executionTime field (in milliseconds) to Report and ReportOnFile
types. Measured via performance.now() in analyse(), analyseFile(), and
analyseFileSync() methods so higher-level APIs can trace performance.

Closes NodeSecure#572
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 22, 2026

🦋 Changeset detected

Latest commit: 107707f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nodesecure/js-x-ray Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@fraxken
Copy link
Copy Markdown
Member

fraxken commented Mar 22, 2026

Please add changesets with semver minor

@PierreDemailly
Copy link
Copy Markdown
Member

Can you update docs ?

cskwork and others added 2 commits March 23, 2026 15:32
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fraxken fraxken merged commit c9f3d16 into NodeSecure:master Mar 23, 2026
7 checks passed
@github-actions github-actions Bot mentioned this pull request Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AstAnalyser - Return execution time

4 participants