summaryrefslogtreecommitdiff
path: root/utils/mem-usage.js
diff options
context:
space:
mode:
Diffstat (limited to 'utils/mem-usage.js')
-rw-r--r--utils/mem-usage.js20
1 files changed, 0 insertions, 20 deletions
diff --git a/utils/mem-usage.js b/utils/mem-usage.js
deleted file mode 100644
index 766a93e..0000000
--- a/utils/mem-usage.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * memory usage report utility
- */
-
-const formatMemoryUsage = (data) => `${Math.round(data / 1024 / 1024 * 100) / 100} MB`;
-
-function report() {
- let memoryData = process.memoryUsage();
-
- let memoryUsage = {
- rss: `${formatMemoryUsage(memoryData.rss)} -> Resident Set Size - total memory allocated for the process execution`,
- heapTotal: `${formatMemoryUsage(memoryData.heapTotal)} -> total size of the allocated heap`,
- heapUsed: `${formatMemoryUsage(memoryData.heapUsed)} -> actual memory used during the execution`,
- external: `${formatMemoryUsage(memoryData.external)} -> V8 external memory`,
- };
-
- console.log(memoryUsage);
-}
-
-module.exports = { report }