MCPcopy Create free account
hub / github.com/OpenMW/openmw / collectStats

Method collectStats

components/lua/scriptscontainer.cpp:819–832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

817 }
818
819 void ScriptsContainer::collectStats(std::vector<ScriptStats>& stats) const
820 {
821 stats.resize(mLua.getConfiguration().size());
822 if (const LoadedData* data = std::get_if<LoadedData>(&mData))
823 {
824 for (auto& [id, script] : data->mScripts)
825 {
826 stats[id].mAvgInstructionCount += script.mStats.mAvgInstructionCount;
827 stats[id].mMemoryUsage += script.mStats.mMemoryUsage;
828 }
829 }
830 for (auto& [id, mem] : mRemovedScriptsMemoryUsage)
831 stats[id].mMemoryUsage += mem;
832 }
833
834 ScriptsContainerWeakPtr ScriptsContainer::getWeakPointer() const
835 {

Callers 8

handleMethod · 0.80
toggleMethod · 0.80
collectStatisticsFunction · 0.80
~ScopedProfileMethod · 0.80
frameMethod · 0.80
updateStatsMethod · 0.80
reportStatsMethod · 0.80

Calls 2

resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected