perf_hooks,http2: add clearEntries to remove http2 entries#18046
perf_hooks,http2: add clearEntries to remove http2 entries#18046jasnell wants to merge 2 commits intonodejs:masterfrom
Conversation
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.
09dfda6 to
b3eebe2
Compare
|
ping @nodejs/http2 |
|
|
||
| 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)?
|
|
||
| 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?
There was a problem hiding this comment.
The nodeTiming entry and yes.
|
@mcollina ... updated |
| } | ||
|
|
||
| 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?
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.
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 <[email protected]>
|
Landed in 20fe04f |
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 <[email protected]>
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 <[email protected]>
Add missing clear() method to `perf_hooks.performance` to remove the entries from the master timeline to prevent that from being a memory leak. Backport-PR-URL: #20456 PR-URL: #18046 Reviewed-By: Matteo Collina <[email protected]>
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
Add missing clearHttp2 method to
perf_hooks.performancetoremove the http2 entries from the master timeline to prevent
that from being a memory leak.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
http2, perf_hooks