MCPcopy
hub / github.com/xpf0000/FlyEnv / then

Method then

src/fork/BaseManager.ts:99–110  ·  view source on GitHub ↗
(res: any)

Source from the content-addressed store, hash-verified

97 async exec(commands: Array<any>) {
98 const ipcCommandKey = commands.shift()
99 const then = (res: any) => {
100 ProcessSendSuccess(ipcCommandKey, res)
101 const memoryUsage = process.memoryUsage()
102 console.log({
103 modules: Array.from(this.modules),
104 rss: `${Math.round((memoryUsage.rss / 1024 / 1024) * 100) / 100} MB`, // 常驻内存
105 heapTotal: `${Math.round((memoryUsage.heapTotal / 1024 / 1024) * 100) / 100} MB`, // 堆内存总量
106 heapUsed: `${Math.round((memoryUsage.heapUsed / 1024 / 1024) * 100) / 100} MB`, // 已用堆内存
107 external: `${Math.round((memoryUsage.external / 1024 / 1024) * 100) / 100} MB`, // 外部内存
108 arrayBuffers: `${Math.round((memoryUsage.arrayBuffers / 1024 / 1024) * 100) / 100} MB` // ArrayBuffer内存
109 })
110 }
111 const error = (e: Error) => {
112 ProcessSendError(ipcCommandKey, e.toString())
113 const memoryUsage = process.memoryUsage()

Callers 15

setupEventHandlersMethod · 0.45
showPageMethod · 0.45
relaunchMethod · 0.45
createBaseDirectoriesFunction · 0.45
extractNginxConfigFunction · 0.45
SetupNginxConfigFunction · 0.45
executeBrewChecksFunction · 0.45
checkBrewRepoFunction · 0.45
checkBrewCellarFunction · 0.45
makeRepoSafeFunction · 0.45
checkMacPortsFunction · 0.45
callForkFunction · 0.45

Calls 2

ProcessSendSuccessFunction · 0.90
logMethod · 0.45

Tested by

no test coverage detected