Skip to content

Commit e5ae295

Browse files
committed
fix: format
1 parent 4617974 commit e5ae295

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/memoryLogger.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,16 @@ export class MemoryLogger {
122122
heapUsed: `${(memoryUsage.heapUsed / 1024 / 1024).toFixed(2)}MB`,
123123
external: `${(memoryUsage.external / 1024 / 1024).toFixed(2)}MB`,
124124
uptime: formatDuration(process.uptime() * 1000),
125-
totalUptime: formatDuration(Date.now() - this.startTime)
125+
totalUptime: formatDuration(Date.now() - this.startTime),
126126
}
127127

128128
const systemMemoryInfo = {
129129
totalMem: `${(os.totalmem() / 1024 / 1024 / 1024).toFixed(2)}GB`,
130130
freeMem: `${(os.freemem() / 1024 / 1024 / 1024).toFixed(2)}GB`,
131-
loadAvg: os.loadavg().map(load => load.toFixed(2)).join(", ")
131+
loadAvg: os
132+
.loadavg()
133+
.map((load) => load.toFixed(2))
134+
.join(", "),
132135
}
133136

134137
const memoryLog = `[MEMORY:${context}] Node: ${JSON.stringify(nodeMemoryInfo)} | System: ${JSON.stringify(systemMemoryInfo)}`
@@ -211,4 +214,4 @@ export function getMemoryLogger(): MemoryLogger {
211214
instance = new MemoryLogger()
212215
}
213216
return instance
214-
}
217+
}

0 commit comments

Comments
 (0)