mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
15 lines
299 B
TypeScript
15 lines
299 B
TypeScript
import memwatch = require("node-memwatch");
|
|
|
|
memwatch.on("stats", info => {
|
|
info.estimated_base;
|
|
});
|
|
|
|
memwatch.on("leak", info => {
|
|
info.growth;
|
|
});
|
|
|
|
const hd = new memwatch.HeapDiff(); // $ExpectType HeapDiff
|
|
const diff = hd.end();
|
|
diff.change.allocated_nodes;
|
|
diff.change.details[0].what;
|