src: add --title command line argument, trace event#21477
src: add --title command line argument, trace event#21477jasnell wants to merge 2 commits intonodejs:masterfrom
Conversation
|
some relevant failures in CI. |
|
@ofrobots ... when you get a moment, can you take a look at this? It would appear that |
8b9d470 to
51111a8
Compare
doc/node.1
Outdated
doc/api/cli.md
Outdated
|
Still exploring why the trace event bit is failing on some of the CI machines.. unable to recreate locally... https://ci.nodejs.org/job/node-test-pull-request/15587/ |
src/node.cc
Outdated
There was a problem hiding this comment.
Are you sure this is safe? Setting the process title (which on a lot of OS works by overwriting argv) while iterating over argv?
There was a problem hiding this comment.
Possibly not ;) still verifying and chasing down a few issues that are likely being caused by exactly this problem. I have a change staged locally that moves the actual set_process_title call to after the args are processed but haven't pushed it up to test yet
There was a problem hiding this comment.
Is the addition of --title tied to the trace event things, or is it a convenience thing? It seems like it’s pretty easy already to set the process title from inside the JS code, so it might be okay to leave this out…?
There was a problem hiding this comment.
They are not tied together but the use case is closely related for me. The introduction of --title is specifically for cases of profiling other users code that I don't exactly want to have to modify just to set the title... using a preload module is a bit overkill for that.
|
Another CI: https://ci.nodejs.org/job/node-test-pull-request/15613/ This is failing on SmartOS only at this point. |
Simple utility command line argument for setting the process title on process startup.
b8c686b to
550335e
Compare
|
Ok, should be good to go now: https://ci.nodejs.org/job/node-test-pull-request/15615/ |
|
CI is good. One unrelated flaky failure in windows. |
Then it's not quite good yet. :-D |
|
Let's give it one more shot since the unrelated windows failure happened again https://ci.nodejs.org/job/node-test-pull-request/15676/ |
PR-URL: #21477 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Simple utility command line argument for setting the process title on process startup. PR-URL: #21477 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
|
Landed in 6705356 and 9d71619 |
PR-URL: #21477 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Simple utility command line argument for setting the process title on process startup. PR-URL: #21477 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Notable changes: * console: * The `console.timeLog()` method has been implemented. (#21312) * deps: * Upgrade to libuv 1.22.0. (#21731) * Upgrade to ICU 62.1 (Unicode 11, CLDR 33.1). (#21728) * http: * Added support for passing both `timeout` and `agent` options to `http.request`. (#21204) * napi: * Added experimental support for functions dealing with bigint numbers. (#21226) * process: * The `process.hrtime.bigint()` method has been implemented. (#21256) * Added the `--title` command line argument to set the process title on startup. (#21477) * trace_events: * Added process_name metadata. (#21477)
Notable changes: * console: * The `console.timeLog()` method has been implemented. (#21312) * deps: * Upgrade to libuv 1.22.0. (#21731) * Upgrade to ICU 62.1 (Unicode 11, CLDR 33.1). (#21728) * http: * Added support for passing both `timeout` and `agent` options to `http.request`. (#21204) * napi: * Added experimental support for functions dealing with bigint numbers. (#21226) * process: * The `process.hrtime.bigint()` method has been implemented. (#21256) * Added the `--title` command line argument to set the process title on startup. (#21477) * trace_events: * Added process_name metadata. (#21477) * Added new collaborators * codebytere - Shelley Vohr PR-URL: #21851
Notable changes:
* console:
* The `console.timeLog()` method has been implemented.
(#21312)
* deps:
* Upgrade to libuv 1.22.0. (#21731)
* Upgrade to ICU 62.1 (Unicode 11, CLDR 33.1).
(#21728)
* http:
* Added support for passing both `timeout` and `agent` options to
`http.request`. (#21204)
* inspector:
* Expose the original console API in `require('inspector').console`.
(#21659)
* napi:
* Added experimental support for functions dealing with bigint numbers.
(#21226)
* process:
* The `process.hrtime.bigint()` method has been implemented.
(#21256)
* Added the `--title` command line argument to set the process title on
startup. (#21477)
* trace_events:
* Added process_name metadata.
(#21477)
* Added new collaborators
* codebytere - Shelley Vohr
PR-URL: #21851
Notable changes:
* console:
* The `console.timeLog()` method has been implemented.
(#21312)
* deps:
* Upgrade to libuv 1.22.0. (#21731)
* Upgrade to ICU 62.1 (Unicode 11, CLDR 33.1).
(#21728)
* http:
* Added support for passing both `timeout` and `agent` options to
`http.request`. (#21204)
* inspector:
* Expose the original console API in `require('inspector').console`.
(#21659)
* napi:
* Added experimental support for functions dealing with bigint numbers.
(#21226)
* process:
* The `process.hrtime.bigint()` method has been implemented.
(#21256)
* Added the `--title` command line argument to set the process title on
startup. (#21477)
* trace_events:
* Added process_name metadata.
(#21477)
* Added new collaborators
* codebytere - Shelley Vohr
PR-URL: #21851
Adds a simple utility
--titlecommand line argument to set the process title on startup. Also, emit theprocess_namemetadata to the trace event log.When emit trace events, the process name appears within the trace event viewer UI:
Changes to
process.titlealso appear within the trace_event log:/cc @ofrobots @eugeneo
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes