@forcecalendar/interface 1.0.2 → 1.0.3
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.
|
@@ -2257,9 +2257,16 @@ class W {
|
|
|
2257
2257
|
if (e.jsHeapSizeLimit && e.usedJSHeapSize)
|
|
2258
2258
|
return e.usedJSHeapSize / e.jsHeapSizeLimit;
|
|
2259
2259
|
}
|
|
2260
|
-
|
|
2261
|
-
const
|
|
2262
|
-
|
|
2260
|
+
try {
|
|
2261
|
+
const t = (typeof globalThis < "u" ? globalThis : {}).process;
|
|
2262
|
+
if (t && typeof t == "object") {
|
|
2263
|
+
const s = t.memoryUsage;
|
|
2264
|
+
if (typeof s == "function") {
|
|
2265
|
+
const i = s.call(t);
|
|
2266
|
+
return i.heapUsed / i.heapTotal;
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
} catch {
|
|
2263
2270
|
}
|
|
2264
2271
|
return this.estimateMemoryUsage();
|
|
2265
2272
|
}
|