Use `process.getActiveResourcesInfo()` instead of `process._activeHandles()`
https://github.com/nodejs/node/pull/41587
Looking at the uses of process._activeHandles() in this repo:
- https://github.com/clinicjs/node-clinic-doctor/blob/efd85ff33c3006c025901fb94d7c6db0f7061f05/collect/process-stat.js#L52
- https://github.com/clinicjs/node-clinic-doctor/blob/efd85ff33c3006c025901fb94d7c6db0f7061f05/test/collect-process-stat.test.js#L37
it looks like the use case here is to track the number of active handles. Is that a hard requirement or will it also be okay if this tracks the number of active resources (handles + requests + timers) instead?
I'm asking because process.getActiveResourcesInfo() currently reports the names of all the active resources. Extracting the number of active handles would require users to count each handle type by name.
I wouldn't say hard requirement, but we do have this info in the clinic doctor report, if we change it suddenly, the users will be quite confused.
Okay, in that case, maybe a semver-major release with this change would be an acceptable solution?
Pretty much