| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Add missing clearHttp2 method to `perf_hooks.performance` to remove the http2 entries from the master timeline to prevent that from being a memory leak.
|
ping @nodejs/http2 |
Sorry, something went wrong.
|
|
||
| clearHttp2() { | ||
| this[kClearEntry]('http2'); | ||
| } |
There was a problem hiding this comment.
I do not think this path is viable, as we will add clearNet(), clearHttp(), clearHTTPS() and so on. How about clear(string)?
Sorry, something went wrong.
There was a problem hiding this comment.
+1.
Sorry, something went wrong.
|
|
||
| process.on('exit', () => { | ||
| // There shouldn't be any http2 entries left over. | ||
| assert.strictEqual(performance.getEntries().length, 1); |
There was a problem hiding this comment.
what is the one entry that is left in there? Can we match that instead?
Sorry, something went wrong.
There was a problem hiding this comment.
The nodeTiming entry and yes.
Sorry, something went wrong.
| } | ||
|
|
||
| clearEntries(name) { | ||
| this[kClearEntry](name); |
There was a problem hiding this comment.
do we still need the Symbol now that this is exposed? Should we perform any validation?
Sorry, something went wrong.
There was a problem hiding this comment.
The symbol form takes the additional name argument, which is not strictly necessary here, so I'd rather keep that. Validation is unnecessary since it would just be a non-op if some other value is passed.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
Sorry, something went wrong.
Add missing clear() method to `perf_hooks.performance` to remove the entries from the master timeline to prevent that from being a memory leak. PR-URL: #18046 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Add missing clear() method to `perf_hooks.performance` to remove the entries from the master timeline to prevent that from being a memory leak. PR-URL: #18046 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Notable changes: * cluster - add cwd to cluster.settings (cjihrig) [#18399](#18399) * deps - upgrade libuv to 1.19.1 (cjihrig) [#18260](#18260) * meta - add Leko to collaborators (Leko) [#18117](#18117) - add vdeturckheim as collaborator (vdeturckheim) [#18432](#18432) * n-api - expose n-api version in process.versions (Michael Dawson) [#18067](#18067) * perf_hooks - add performance.clear() (James M Snell) [#18046](#18046) * stream - avoid writeAfterEnd() while ending (陈刚) [#18170](#18170) PR-URL: #18464
Notable changes: * cluster - add cwd to cluster.settings (cjihrig) [#18399](#18399) * deps - upgrade libuv to 1.19.1 (cjihrig) [#18260](#18260) * meta - add Leko to collaborators (Leko) [#18117](#18117) - add vdeturckheim as collaborator (vdeturckheim) [#18432](#18432) * n-api - expose n-api version in process.versions (Michael Dawson) [#18067](#18067) * perf_hooks - add performance.clear() (James M Snell) [#18046](#18046) * stream - avoid writeAfterEnd() while ending (陈刚) [#18170](#18170) PR-URL: #18464
Notable changes: * cluster - add cwd to cluster.settings (cjihrig) [#18399](#18399) * deps - upgrade libuv to 1.19.1 (cjihrig) [#18260](#18260) * meta - add Leko to collaborators (Leko) [#18117](#18117) - add vdeturckheim as collaborator (vdeturckheim) [#18432](#18432) * n-api - expose n-api version in process.versions (Michael Dawson) [#18067](#18067) * perf_hooks - add performance.clear() (James M Snell) [#18046](#18046) * stream - avoid writeAfterEnd() while ending (陈刚) [#18170](#18170) PR-URL: #18464
Add missing clear() method to `perf_hooks.performance` to remove the entries from the master timeline to prevent that from being a memory leak. PR-URL: nodejs#18046 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Notable changes: * cluster - add cwd to cluster.settings (cjihrig) [nodejs#18399](nodejs#18399) * deps - upgrade libuv to 1.19.1 (cjihrig) [nodejs#18260](nodejs#18260) * meta - add Leko to collaborators (Leko) [nodejs#18117](nodejs#18117) - add vdeturckheim as collaborator (vdeturckheim) [nodejs#18432](nodejs#18432) * n-api - expose n-api version in process.versions (Michael Dawson) [nodejs#18067](nodejs#18067) * perf_hooks - add performance.clear() (James M Snell) [nodejs#18046](nodejs#18046) * stream - avoid writeAfterEnd() while ending (陈刚) [nodejs#18170](nodejs#18170) PR-URL: nodejs#18464
| Back | FazBrowse Home | New Git URL |
Add missing clearHttp2 method to perf_hooks.performance to
remove the http2 entries from the master timeline to prevent
that from being a memory leak.
Checklist
Affected core subsystem(s)
http2, perf_hooks