Skip to content

Implement runWithContext#275

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

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

Conversation

@szegedi
Copy link

@szegedi szegedi commented Feb 16, 2026

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.

@szegedi szegedi requested a review from nsavoire as a code owner February 16, 2026 22:12
@szegedi szegedi added the semver-minor Usually minor non-breaking improvements label Feb 16, 2026
@github-actions
Copy link

github-actions bot commented Feb 16, 2026

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
Copy link

pr-commenter bot commented Feb 16, 2026

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 szegedi force-pushed the szegedi/run-with-context branch from 99d1d57 to 21554cd Compare February 17, 2026 10:40
@szegedi szegedi force-pushed the szegedi/run-with-context branch from 21554cd to 705e5a3 Compare February 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
Copy link

@IlyasShabi IlyasShabi left a comment

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 main February 20, 2026 11:09
@szegedi szegedi dismissed stale reviews from nsavoire and IlyasShabi February 20, 2026 11:09

The base branch was changed.

@szegedi szegedi force-pushed the szegedi/run-with-context branch from 705e5a3 to 7dca0db Compare February 20, 2026 11:11
@szegedi szegedi merged commit 857d777 into main Feb 20, 2026
68 checks passed
@szegedi szegedi deleted the szegedi/run-with-context branch February 20, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-minor Usually minor non-breaking improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments