MCPcopy Create free account
hub / github.com/Snapchat/Valdi / dumpMemoryStatistics

Method dumpMemoryStatistics

valdi/src/valdi/runtime/RuntimeManager.cpp:727–737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

725
726JavaScriptContextMemoryStatistics 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
738void RuntimeManager::dumpMemoryStatisticsAsync(Function<void(JavaScriptContextMemoryStatistics)> completion) {
739 const auto runtimes = this->getAllRuntimes();
740 if (runtimes.empty()) {

Callers

nothing calls this directly

Calls 3

getAllRuntimesMethod · 0.95
getJavaScriptRuntimeMethod · 0.80
dumpMemoryStatisticsMethod · 0.65

Tested by

no test coverage detected