| 725 | |
| 726 | JavaScriptContextMemoryStatistics RuntimeManager::dumpMemoryStatistics() { |
| 727 | const auto runtimes = this->getAllRuntimes(); |
| 728 | JavaScriptContextMemoryStatistics stats; |
| 729 | for (const auto& runtime : runtimes) { |
| 730 | auto stat = runtime->getJavaScriptRuntime()->dumpMemoryStatistics(); |
| 731 | stats.memoryUsageBytes += stat.memoryUsageBytes; |
| 732 | stats.objectsCount += stat.objectsCount; |
| 733 | } |
| 734 | |
| 735 | return stats; |
| 736 | } |
| 737 | |
| 738 | void RuntimeManager::dumpMemoryStatisticsAsync(Function<void(JavaScriptContextMemoryStatistics)> completion) { |
| 739 | const auto runtimes = this->getAllRuntimes(); |
| 740 | if (runtimes.empty()) { |
nothing calls this directly
no test coverage detected