Skip to content

Implement runWithContext - #275

Merged
szegedi merged 1 commit into
mainfrom
szegedi/run-with-context
Feb 20, 2026
Merged

Implement runWithContext#275
szegedi merged 1 commit into
mainfrom
szegedi/run-with-context

Conversation

@szegedi

@szegediszegedi commented Feb 16, 2026

Copy link
Copy Markdown

What does this PR do?:

  • Also adds a createContextHolder method to the profiler for direct use of custom contexts with AsyncLocalStorage.run()
  • implements a TimeProfiler.runWithContext on top of it.

Motivation:
This can be used by dd-trace-js for implementing custom contexts

How to test the change?:
It comes with unit tests.

@szegediszegedi added the semver-minor Usually minor non-breaking improvements label Feb 16, 2026
@github-actions

github-actionsBot commented Feb 16, 2026

Copy link
Copy Markdown

Overall package size

Self size: 1.9 MB
Deduped: 2.27 MB
No deduping: 2.27 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | source-map | 0.7.6 | 185.63 kB | 185.63 kB | | pprof-format | 2.2.1 | 163.06 kB | 163.06 kB | | p-limit | 3.1.0 | 7.75 kB | 13.78 kB | | node-gyp-build | 3.9.0 | 8.81 kB | 8.81 kB |

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

@pr-commenter

pr-commenterBot commented Feb 16, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-02-20 11:17:11

Comparing candidate commit 7dca0db in PR branch szegedi/run-with-context with baseline commit a2649a6 in branch main.

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

@szegedi
szegedi marked this pull request as draft February 17, 2026 10:32
@szegedi
szegediforce-pushed the szegedi/run-with-context branch from 99d1d57 to 21554cdCompareFebruary 17, 2026 10:40
@szegedi
szegediforce-pushed the szegedi/run-with-context branch from 21554cd to 705e5a3CompareFebruary 17, 2026 11:25
@szegedi
szegedi marked this pull request as ready for review February 17, 2026 11:28
IlyasShabi
IlyasShabi previously approved these changes Feb 17, 2026

@IlyasShabiIlyasShabi 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.

LGTM

nsavoire
nsavoire previously approved these changes Feb 18, 2026
Base automatically changed from szegedi/acf-simple to mainFebruary 20, 2026 11:09
@szegedi
szegedi dismissed stale reviews from nsavoire and IlyasShabiFebruary 20, 2026 11:09

The base branch was changed.

@szegedi
szegediforce-pushed the szegedi/run-with-context branch from 705e5a3 to 7dca0dbCompareFebruary 20, 2026 11:11
@szegedi
szegedi merged commit 857d777 into mainFeb 20, 2026
68 checks passed
@szegedi
szegedi deleted the szegedi/run-with-context branch February 20, 2026 14:47
szegedi added a commit that referenced this pull request Mar 10, 2026
@szegediszegedi mentioned this pull request Mar 10, 2026
szegedi added a commit that referenced this pull request Mar 18, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-minorUsually minor non-breaking improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@szegedi@nsavoire@IlyasShabi