-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: unify uptime base used across the code base #26016
Conversation
This patch joins `per_process::prog_start_time` (a double) and `performance::performance_node_start` (a uint64_t) into a `per_process::node_start_time` (a uint64_t) which gets initialized in `node::Start()`.
b0dbcb3
to
f6912ca
Compare
Rebased and switched to constexpr: https://ci.nodejs.org/job/node-test-pull-request/20828/ |
Landed in fd0a861 |
This patch joins `per_process::prog_start_time` (a double) and `performance::performance_node_start` (a uint64_t) into a `per_process::node_start_time` (a uint64_t) which gets initialized in `node::Start()`. PR-URL: #26016 Reviewed-By: Anna Henningsen <anna@addaleax.net>
This patch joins `per_process::prog_start_time` (a double) and `performance::performance_node_start` (a uint64_t) into a `per_process::node_start_time` (a uint64_t) which gets initialized in `node::Start()`. PR-URL: #26016 Reviewed-By: Anna Henningsen <anna@addaleax.net>
This changed the behavior of I'm guessing there's a a quick fix rather than requiring a revert? I'm guessing it's a matter of "oops, we had been reporting milliseconds and now we're reporting nanoseconds" or something like that. |
In nodejs#26016 the result returned by process.uptime() was mistakenly set to be based in the wrong unit. This patch fixes the calculation and makes sure the returned value is in seconds. Refs: nodejs#26016
In nodejs#26016 the result returned by process.uptime() was mistakenly set to be based in the wrong unit. This patch fixes the calculation and makes sure the returned value is in seconds. Refs: nodejs#26016 PR-URL: nodejs#26206 Fixes: nodejs#26205 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
In addition, do not make too many assumptions about the startup time and timer latency in test-process-uptime. Instead only test that the value is likely in the correct unit (seconds) and it should be increasing in subsequent calls. PR-URL: nodejs#26206 Fixes: nodejs#26205 Refs: nodejs#26016 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
In #26016 the result returned by process.uptime() was mistakenly set to be based in the wrong unit. This patch fixes the calculation and makes sure the returned value is in seconds. Refs: #26016 PR-URL: #26206 Fixes: #26205 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
In addition, do not make too many assumptions about the startup time and timer latency in test-process-uptime. Instead only test that the value is likely in the correct unit (seconds) and it should be increasing in subsequent calls. PR-URL: #26206 Fixes: #26205 Refs: #26016 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This patch joins `per_process::prog_start_time` (a double) and `performance::performance_node_start` (a uint64_t) into a `per_process::node_start_time` (a uint64_t) which gets initialized in `node::Start()`. PR-URL: #26016 Reviewed-By: Anna Henningsen <anna@addaleax.net>
In #26016 the result returned by process.uptime() was mistakenly set to be based in the wrong unit. This patch fixes the calculation and makes sure the returned value is in seconds. Refs: #26016 PR-URL: #26206 Fixes: #26205 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
In addition, do not make too many assumptions about the startup time and timer latency in test-process-uptime. Instead only test that the value is likely in the correct unit (seconds) and it should be increasing in subsequent calls. PR-URL: #26206 Fixes: #26205 Refs: #26016 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This patch joins
per_process::prog_start_time
(a double)and
performance::performance_node_start
(a uint64_t) into aper_process::node_start_time
(a uint64_t) which gets initializedin
node::Start()
.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes