@nxtedition/lib 23.9.16 → 23.9.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.js +17 -14
- package/package.json +1 -1
package/app.js
CHANGED
|
@@ -524,23 +524,27 @@ export function makeApp(appConfig, onTerminate) {
|
|
|
524
524
|
rx.map(() => performance.eventLoopUtilization?.()),
|
|
525
525
|
rx.pairwise(),
|
|
526
526
|
rx.map(([elu1, elu2]) => {
|
|
527
|
-
const
|
|
527
|
+
const mem = process.memoryUsage()
|
|
528
528
|
const cpu = process.cpuUsage()
|
|
529
529
|
|
|
530
|
-
|
|
530
|
+
const memory = {
|
|
531
|
+
rss: mem.rss,
|
|
532
|
+
heapTotal: mem.heapTotal,
|
|
533
|
+
heapUsed: mem.heapUsed,
|
|
534
|
+
external: mem.external,
|
|
535
|
+
arrayBuffers: mem.arrayBuffers,
|
|
536
|
+
totalHeapTotal: 0,
|
|
537
|
+
totalHeapUsed: 0,
|
|
538
|
+
totalExternal: 0,
|
|
539
|
+
totalArrayBuffers: 0,
|
|
540
|
+
}
|
|
541
|
+
|
|
531
542
|
if (memoryUsageMap) {
|
|
532
|
-
totalMemory = {
|
|
533
|
-
rss: memory.rss,
|
|
534
|
-
heapTotal: 0,
|
|
535
|
-
heapUsed: 0,
|
|
536
|
-
external: 0,
|
|
537
|
-
arrayBuffers: 0,
|
|
538
|
-
}
|
|
539
543
|
for (const memoryUsage of memoryUsageMap.values()) {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
+
memory.totalHeapTotal += memoryUsage.heapTotal
|
|
545
|
+
memory.totalHeapUsed += memoryUsage.heapUsed
|
|
546
|
+
memory.totalExternal += memoryUsage.external
|
|
547
|
+
memory.totalArrayBuffers += memoryUsage.arrayBuffers
|
|
544
548
|
}
|
|
545
549
|
}
|
|
546
550
|
|
|
@@ -552,7 +556,6 @@ export function makeApp(appConfig, onTerminate) {
|
|
|
552
556
|
underPressure: underPressure?.isUnderPressure() ? underPressure.getPressure() : null,
|
|
553
557
|
cpu,
|
|
554
558
|
memory,
|
|
555
|
-
totalMemory,
|
|
556
559
|
resourceLimits,
|
|
557
560
|
utilization: performance.eventLoopUtilization?.(elu2, elu1),
|
|
558
561
|
heap: v8.getHeapStatistics(),
|