Showing the changes to scripts/developer/debugging/scriptMemoryReport.js (1 of 11 files). Show all
Unified · Split
| @@ -15,11 +15,21 @@ · 14 unmodified lines | |||
| 15 | 15 | ||
| 16 | var memoryStatisticsIntervalHandle = Script.setInterval(function () { | 16 | var memoryStatisticsIntervalHandle = Script.setInterval(function () { |
| 17 | statistics = Script.getMemoryUsageStatistics(); | 17 | statistics = Script.getMemoryUsageStatistics(); |
| 18 | print("Script memory usage: Total heap size: " + statistics.totalHeapSize | 18 | if (statistics.scriptValueCount != null) { |
| 19 | + " usedHeapSize: " + statistics.usedHeapSize | 19 | print("Script memory usage: Total heap size: " + statistics.totalHeapSize |
| 20 | + " totalAvailableSize: " + statistics.totalAvailableSize | 20 | + " usedHeapSize: " + statistics.usedHeapSize |
| 21 | + " totalGlobalHandlesSize: " + statistics.totalGlobalHandlesSize | 21 | + " 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 | ||
| 25 | Script.scriptEnding.connect(function () { | 35 | Script.scriptEnding.connect(function () { |