-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
perf_hooks: refactor internals #17822
Conversation
Refactor and simplify the perf_hooks native internals.
src/node_perf.cc
Outdated
@@ -30,63 +29,106 @@ uint64_t performance_v8_start; | |||
uint64_t performance_last_gc_start_mark_ = 0; | |||
v8::GCType performance_last_gc_type_ = v8::GCType::kGCTypeAll; | |||
|
|||
// Initialize the performance entry object properties | |||
inline void InitObject(PerformanceEntry* entry, Local<Object> obj) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const PerformanceEntry& entry
? Makes it a bit more obvious which parameter is the source/target
src/node_perf.h
Outdated
|
||
~PerformanceEntry() {} | ||
virtual Local<Object> ToObject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could/should be const
as well I think?
Refactor and simplify the perf_hooks native internals. PR-URL: #17822 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Landed in 9e5ccf0 |
Refactor and simplify the perf_hooks native internals. PR-URL: #17822 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Refactor and simplify the perf_hooks native internals. PR-URL: #17822 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Refactor and simplify the perf_hooks native internals. PR-URL: #17822 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Should this be backported to |
Refactor and simplify the perf_hooks native internals. PR-URL: nodejs#17822 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Refactor and simplify the perf_hooks native internals.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
perf_hooks