From b3eebe2e4d04233b133d58317d9fa4912fc1715f Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 8 Jan 2018 13:32:30 -0800 Subject: [PATCH 1/2] perf_hooks,http2: add clearHttp2 to remove http2 entries 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. --- doc/api/perf_hooks.md | 7 +++++++ lib/perf_hooks.js | 4 ++++ test/parallel/test-http2-perf_hooks.js | 8 +++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index 5ce94624cb9d22..1c852da77058db 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -39,6 +39,13 @@ added: v8.5.0 If `name` is not provided, removes all `PerformanceFunction` objects from the Performance Timeline. If `name` is provided, removes entries with `name`. +### performance.clearHttp2() + + +Remove all `http2` performance entry objects from the Performance Timeline. + ### performance.clearMarks([name]) + +Remove all performance entry objects with `entryType` equal to `name` from the +Performance Timeline. + ### performance.clearFunctions([name]) - -Remove all `http2` performance entry objects from the Performance Timeline. - ### performance.clearMarks([name])