| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
cc @nodejs/workers |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Labeled this as semver-major because adding a parameter here is breaking the ABI (and, since there is no default value for the parameter, also the API); you can avoid that by adding an overload with this signature instead of changing the signature.
(For example: c566a04 introduced a new parameter to a C++ API function in an ABI-compatible way, e8bddac followed up as a semver-major change to simplify the implementation again)
Sorry, something went wrong.
There was a problem hiding this comment.
Ah understood! I think overloading would be better, updating!
Sorry, something went wrong.
There was a problem hiding this comment.
Updated, could you check
Sorry, something went wrong.
Maybe you can create a worker with a prefix and then assert on the title property on the workerInfo object like in here ? |
Sorry, something went wrong.
|
Perfect just what I was looking for thank you so much @RaisinTen ❤️!! |
Sorry, something went wrong.
|
Added tests and doc, opening it for review! |
Sorry, something went wrong.
|
Purely cosmetic observation: options.titlePrefix feels kinda clunky and foo Worker 42 looks kinda ugly. Suggestion: rename it to options.title or options.name (I like that last one better), change the default to [worker 42] and append the name so it turns into [worker 42] foo. Besides aesthetics, it has the benefit that you can still sort workers by id. |
Sorry, something went wrong.
|
This makes sense implementing these changes @bnoordhuis, also I think we can make the trace name same as this #41589 (comment) for consistency |
Sorry, something went wrong.
|
Will changing the name formation of workers be a semver-major change? |
Sorry, something went wrong.
There was a problem hiding this comment.
Hello ThreadWorker just feels a bit odd (specifically, not having a space between the prefix and Worker). I would almost prefer a model like Worker {id} [label] ... e.g. Worker 1 [Hello Thread]. Consider this non-blocking tho.
Sorry, something went wrong.
There was a problem hiding this comment.
Yes i am updating the name formation as per this #46832 (comment)
Sorry, something went wrong.
Commit Queue failed- Loading data for nodejs/node/pull/46832 ✔ Done loading data for nodejs/node/pull/46832 ----------------------------------- PR info ------------------------------------ Title worker: add support for worker name in inspector and trace_events (#46832) Author Debadree Chatterjee (@debadree25) Branch debadree25:ft/worker-prefix -> nodejs:main Labels c++, semver-minor, lib / src, author ready, worker, needs-ci, commit-queue-squash Commits 20 - worker: add support for worker name in inspector and trace_events - fixup! remove breaking change - fixup! add a test - fixup! add doc - fixup! lint - fixup! lint - fixup! null check - fixup! simplify function - fixup! update name formation - fixup! refactor option name - fixup! update worker trace name - fixup! lint - fixup! lint - fixup! lint again - fixup! surround with mustcall - fixup! - fixup! move the session to worker thread - fixup! keep worker alive - fixup! move worker code to a fixture - fixup! typo Committers 1 - Debadree Chatterjee PR-URL: https://github.com/nodejs/node/pull/46832 Fixes: https://github.com/nodejs/node/issues/41589 Reviewed-By: Ben Noordhuis Reviewed-By: Benjamin Gruenbaum Reviewed-By: Anna Henningsen Reviewed-By: Darshan Sen Reviewed-By: Gireesh Punathil ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/46832 Fixes: https://github.com/nodejs/node/issues/41589 Reviewed-By: Ben Noordhuis Reviewed-By: Benjamin Gruenbaum Reviewed-By: Anna Henningsen Reviewed-By: Darshan Sen Reviewed-By: Gireesh Punathil -------------------------------------------------------------------------------- ℹ This PR was created on Sat, 25 Feb 2023 13:06:32 GMT ✔ Approvals: 5 ✔ - Ben Noordhuis (@bnoordhuis): https://github.com/nodejs/node/pull/46832#pullrequestreview-1317249969 ✔ - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/46832#pullrequestreview-1318020184 ✔ - Anna Henningsen (@addaleax): https://github.com/nodejs/node/pull/46832#pullrequestreview-1318030016 ✔ - Darshan Sen (@RaisinTen) (TSC): https://github.com/nodejs/node/pull/46832#pullrequestreview-1325986351 ✔ - Gireesh Punathil (@gireeshpunathil) (TSC): https://github.com/nodejs/node/pull/46832#pullrequestreview-1324899481 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2023-03-02T18:36:53Z: https://ci.nodejs.org/job/node-test-pull-request/50160/ ⚠ Commits were pushed after the last Full PR CI run: ⚠ - fixup! typo - Querying data for job/node-test-pull-request/50160/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/4342938214 |
Sorry, something went wrong.
Sorry, something went wrong.
Notable changes: buffer: * (SEMVER-MINOR) add Buffer.copyBytesFrom(...) (James M Snell) #46500 doc: * add marco-ippolito to collaborators (Marco Ippolito) #46816 events: * (SEMVER-MINOR) add listener argument to listenerCount (Paolo Insogna) #46523 lib: * (SEMVER-MINOR) add AsyncLocalStorage.bind() and .snapshot() (flakey5) #46387 src: * (SEMVER-MINOR) add `fs.openAsBlob` to support File-backed Blobs (James M Snell) #45258 tls: * (SEMVER-MINOR) support automatic DHE (Tobias Nießen) #46978 url: * (SEMVER-MINOR) implement URLSearchParams size getter (James M Snell) #46308 wasi: * (SEMVER-MINOR) add support for version when creating WASI (Michael Dawson) #46469 worker: * (SEMVER-MINOR) add support for worker name in inspector and trace_events (Debadree Chatterjee) #46832 PR-URL: #47087
Notable changes: buffer: * (SEMVER-MINOR) add Buffer.copyBytesFrom(...) (James M Snell) #46500 doc: * add marco-ippolito to collaborators (Marco Ippolito) #46816 events: * (SEMVER-MINOR) add listener argument to listenerCount (Paolo Insogna) #46523 lib: * (SEMVER-MINOR) add AsyncLocalStorage.bind() and .snapshot() (flakey5) #46387 src: * (SEMVER-MINOR) add `fs.openAsBlob` to support File-backed Blobs (James M Snell) #45258 tls: * (SEMVER-MINOR) support automatic DHE (Tobias Nießen) #46978 url: * (SEMVER-MINOR) implement URLSearchParams size getter (James M Snell) #46308 wasi: * (SEMVER-MINOR) add support for version when creating WASI (Michael Dawson) #46469 worker: * (SEMVER-MINOR) add support for worker name in inspector and trace_events (Debadree Chatterjee) #46832 PR-URL: #47087
Notable changes: * buffer: * (SEMVER-MINOR) add Buffer.copyBytesFrom(...) (James M Snell) #46500 * doc: * add marco-ippolito to collaborators (Marco Ippolito) #46816 * add debadree25 to collaborators (Debadree Chatterjee) #46716 * add deokjinkim to collaborators (Deokjin Kim) #46444 * events: * (SEMVER-MINOR) add listener argument to listenerCount (Paolo Insogna) #46523 * lib: * (SEMVER-MINOR) add AsyncLocalStorage.bind() and .snapshot() (flakey5) #46387 * (SEMVER-MINOR) add aborted() utility function (Debadree Chatterjee) #46494 * src: * (SEMVER-MINOR) allow optional Isolate termination in node::Stop() (Shelley Vohr) #46583 * (SEMVER-MINOR) allow embedder control of code generation policy (Shelley Vohr) #46368 * stream: * (SEMVER-MINOR) add abort signal for ReadableStream and WritableStream (Debadree Chatterjee) #46273 * tls: * (SEMVER-MINOR) support automatic DHE (Tobias Nießen) #46978 * url: * (SEMVER-MINOR) implement URLSearchParams size getter (James M Snell) #46308 * worker: * (SEMVER-MINOR) add support for worker name in inspector and trace_events (Debadree Chatterjee) #46832 PR-URL: #47502
Notable changes: * buffer: * (SEMVER-MINOR) add Buffer.copyBytesFrom(...) (James M Snell) #46500 * doc: * add marco-ippolito to collaborators (Marco Ippolito) #46816 * add debadree25 to collaborators (Debadree Chatterjee) #46716 * add deokjinkim to collaborators (Deokjin Kim) #46444 * events: * (SEMVER-MINOR) add listener argument to listenerCount (Paolo Insogna) #46523 * lib: * (SEMVER-MINOR) add AsyncLocalStorage.bind() and .snapshot() (flakey5) #46387 * (SEMVER-MINOR) add aborted() utility function (Debadree Chatterjee) #46494 * src: * (SEMVER-MINOR) allow optional Isolate termination in node::Stop() (Shelley Vohr) #46583 * (SEMVER-MINOR) allow embedder control of code generation policy (Shelley Vohr) #46368 * (SEMVER-MINOR) add initial support for single executable applications (Darshan Sen) #45038 * stream: * (SEMVER-MINOR) add abort signal for ReadableStream and WritableStream (Debadree Chatterjee) #46273 * tls: * (SEMVER-MINOR) support automatic DHE (Tobias Nießen) #46978 * url: * (SEMVER-MINOR) implement URLSearchParams size getter (James M Snell) #46308 * worker: * (SEMVER-MINOR) add support for worker name in inspector and trace_events (Debadree Chatterjee) #46832 PR-URL: #47502
Notable changes:
Add initial support for single executable applications
Compile a JavaScript file into a single executable application:
```console
$ echo 'console.log(`Hello, ${process.argv[2]}!`);' > hello.js
$ cp $(command -v node) hello
$ npx postject hello NODE_JS_CODE hello.js \
--sentinel-fuse NODE_JS_FUSE_fce680ab2cc467b6e072b8b5df1996b2
$ npx postject hello NODE_JS_CODE hello.js \
--sentinel-fuse NODE_JS_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \
--macho-segment-name NODE_JS
$ ./hello world
Hello, world!
```
Contributed by Darshan Sen in #45038
Replace url parser with Ada
Node.js gets a new URL parser called Ada that is compliant with the WHATWG
URL Specification and provides more than 100% performance improvement to
the existing implementation.
Contributed by Yagiz Nizipli in #46410
Other notable changes:
* buffer:
* (SEMVER-MINOR) add Buffer.copyBytesFrom(...) (James M Snell) #46500
* doc:
* add marco-ippolito to collaborators (Marco Ippolito) #46816
* add debadree25 to collaborators (Debadree Chatterjee) #46716
* add deokjinkim to collaborators (Deokjin Kim) #46444
* events:
* (SEMVER-MINOR) add listener argument to listenerCount (Paolo Insogna) #46523
* lib:
* (SEMVER-MINOR) add AsyncLocalStorage.bind() and .snapshot() (flakey5) #46387
* (SEMVER-MINOR) add aborted() utility function (Debadree Chatterjee) #46494
* src:
* (SEMVER-MINOR) allow optional Isolate termination in node::Stop() (Shelley Vohr) #46583
* (SEMVER-MINOR) allow embedder control of code generation policy (Shelley Vohr) #46368
* stream:
* (SEMVER-MINOR) add abort signal for ReadableStream and WritableStream (Debadree Chatterjee) #46273
* tls:
* (SEMVER-MINOR) support automatic DHE (Tobias Nießen) #46978
* url:
* (SEMVER-MINOR) implement URLSearchParams size getter (James M Snell) #46308
* worker:
* (SEMVER-MINOR) add support for worker name in inspector and trace_events (Debadree Chatterjee) #46832
PR-URL: #47502
Notable changes:
Add initial support for single executable applications
Compile a JavaScript file into a single executable application:
```console
$ echo 'console.log(`Hello, ${process.argv[2]}!`);' > hello.js
$ cp $(command -v node) hello
$ npx postject hello NODE_JS_CODE hello.js \
--sentinel-fuse NODE_JS_FUSE_fce680ab2cc467b6e072b8b5df1996b2
$ npx postject hello NODE_JS_CODE hello.js \
--sentinel-fuse NODE_JS_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \
--macho-segment-name NODE_JS
$ ./hello world
Hello, world!
```
Contributed by Darshan Sen in #45038
Replace url parser with Ada
Node.js gets a new URL parser called Ada that is compliant with the WHATWG
URL Specification and provides more than 100% performance improvement to
the existing implementation.
Contributed by Yagiz Nizipli in #46410
Other notable changes:
* buffer:
* (SEMVER-MINOR) add Buffer.copyBytesFrom(...) (James M Snell) #46500
* doc:
* add marco-ippolito to collaborators (Marco Ippolito) #46816
* add debadree25 to collaborators (Debadree Chatterjee) #46716
* add deokjinkim to collaborators (Deokjin Kim) #46444
* events:
* (SEMVER-MINOR) add listener argument to listenerCount (Paolo Insogna) #46523
* lib:
* (SEMVER-MINOR) add AsyncLocalStorage.bind() and .snapshot() (flakey5) #46387
* (SEMVER-MINOR) add aborted() utility function (Debadree Chatterjee) #46494
* src:
* (SEMVER-MINOR) allow optional Isolate termination in node::Stop() (Shelley Vohr) #46583
* (SEMVER-MINOR) allow embedder control of code generation policy (Shelley Vohr) #46368
* stream:
* (SEMVER-MINOR) add abort signal for ReadableStream and WritableStream (Debadree Chatterjee) #46273
* tls:
* (SEMVER-MINOR) support automatic DHE (Tobias Nießen) #46978
* url:
* (SEMVER-MINOR) implement URLSearchParams size getter (James M Snell) #46308
* worker:
* (SEMVER-MINOR) add support for worker name in inspector and trace_events (Debadree Chatterjee) #46832
PR-URL: #47502
| Back | FazBrowse Home | New Git URL |
This is an attempt at adding a title prefix for the names of workers, while the change works well on VSCode I have no idea how to write a unit test for the same, so any help on that aspect would be helpful, also my cpp knowledge is shaky at best have tried my best to trace the code and add the variable here :-)
EDIT: Added tests and doc
Fixes: #41589