History

Added script value and script value proxy counters

ksuprynowicz committed 3 years ago

Commit cd110661 parent 785867311 files · +85 −12Browse files

Showing the changes to scripts/developer/debugging/scriptMemoryReport.js (1 of 11 files). Show all

Unified · Split

scripts/developer/debugging/scriptMemoryReport.js+15−5
@@ -15,11 +15,21 @@ · 14 unmodified lines
15 15
16var memoryStatisticsIntervalHandle = Script.setInterval(function () {16var memoryStatisticsIntervalHandle = Script.setInterval(function () {
17 statistics = Script.getMemoryUsageStatistics();17 statistics = Script.getMemoryUsageStatistics();
18 print("Script memory usage: Total heap size: " + statistics.totalHeapSize18 if (statistics.scriptValueCount != null) {
19 + " usedHeapSize: " + statistics.usedHeapSize19 print("Script memory usage: Total heap size: " + statistics.totalHeapSize
20 + " totalAvailableSize: " + statistics.totalAvailableSize20 + " usedHeapSize: " + statistics.usedHeapSize
21 + " totalGlobalHandlesSize: " + statistics.totalGlobalHandlesSize21 + " totalAvailableSize: " + statistics.totalAvailableSize
22 + " usedGlobalHandlesSize: " + statistics.usedGlobalHandlesSize);22 + " totalGlobalHandlesSize: " + statistics.totalGlobalHandlesSize
23 + " usedGlobalHandlesSize: " + statistics.usedGlobalHandlesSize
24 + " scriptValueCount: " + statistics.scriptValueCount
25 + " scriptValueProxyCount: " + statistics.scriptValueProxyCount);
26 } else {
27 print("Script memory usage: Total heap size: " + statistics.totalHeapSize
28 + " usedHeapSize: " + statistics.usedHeapSize
29 + " totalAvailableSize: " + statistics.totalAvailableSize
30 + " totalGlobalHandlesSize: " + statistics.totalGlobalHandlesSize
31 + " usedGlobalHandlesSize: " + statistics.usedGlobalHandlesSize);
32 }
23}, 5000);33}, 5000);
24 34
25Script.scriptEnding.connect(function () {35Script.scriptEnding.connect(function () {