-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Hi, I'm opening this issue for
- people searching for this kind of feature have an idea of how to do it
- as suggestion of an entry in the README
- bake it in the lib
- collect ideas on how to improve my code
I would like to compare how much memory my solutions use. I don't know how reliable this is, but might be better then nothing.
This is how I'm doing it, it only works for a single run. There are many potential problems to this
- GC timing vs time taken to run the test
- if multiple test cases, I don't know how much you can trust the heap at that moment
complete((summary) => {
const used = process.memoryUsage().heapUsed / 1024 / 1024;
console.log(`\nThe script uses approximately ${Math.round(used * 100) / 100} MB`);
}),
liamdon and arnthors
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request