node-clinic
node-clinic copied to clipboard
heapprofiler: how to get around initial boot noise?
when a large server starts, there are usually tons of allocations on boot, which are often less interesting than the baseline that follows. we need some sort of option to filter out that noise. as I see it there are a few ways to go about this:
- allow filtering in the UI by time (probably not easy as flamegraph format has no time axis, maybe flamescope style?)
- allow collecting and stopping programmatically on the current process (not by spawning a new process, since then we're back at the same problem)
- add a delay option to the profiler so we can at least set some large delay until we're sure the server started.
Thanks!
I think we could go with the option 3. We already have
--stop-delay Add a delay to close the process when a job is done through either `autocannon` or `on-port` flag (milliseconds)
So adding a --start-delay
seems reasonable.