Some checks failed
/ build (map[dockerfile:./services/tasks/Dockerfile name:tasks]) (push) Failing after 1m25s
/ deploy (push) Has been skipped
/ build (map[dockerfile:./services/files/Dockerfile name:files]) (push) Failing after 1m34s
/ build (map[dockerfile:./services/app/Dockerfile name:app]) (push) Successful in 2m9s
/ build (map[dockerfile:./services/api/Dockerfile name:api]) (push) Failing after 1m42s
/ build (map[dockerfile:./services/web/Dockerfile name:web]) (push) Failing after 1m18s
/ build (map[dockerfile:./services/watchers/Dockerfile name:watchers]) (push) Failing after 1m22s
/ build (map[dockerfile:./services/hasura/Dockerfile name:hasura]) (push) Successful in 2m3s
20 lines
677 B
JavaScript
20 lines
677 B
JavaScript
module.exports = function displayMemoryUsage() {
|
|
const formatMemoryUsage = (data) =>
|
|
`${Math.round((data / 1024 / 1024) * 100) / 100} MB`
|
|
|
|
const memoryData = process.memoryUsage()
|
|
|
|
const 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`,
|
|
}
|
|
return memoryUsage
|
|
}
|