mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
12 lines
400 B
TypeScript
12 lines
400 B
TypeScript
import GCStats = require("gc-stats");
|
|
import { GCStatistics } from "gc-stats";
|
|
|
|
const gcStats = GCStats();
|
|
|
|
gcStats.on("stats", (stats: GCStatistics) => {
|
|
const { gctype: gcType, startTime, endTime, before, after, diff } = stats;
|
|
const beforeMallocedMemory = before.mallocedMemory;
|
|
const afterMallocedMemory = after.mallocedMemory;
|
|
const diffMallocedMemory = diff.mallocedMemory;
|
|
});
|