Merge branch 'navmesh_cache_metrics' into 'master'

Navmesh cache metrics

See merge request OpenMW/openmw!3025
simplify_debugging
psi29a 2 years ago
commit 952bb016be

@ -823,6 +823,8 @@ namespace DetourNavigator
void DbWorker::processReadingJob(JobIt job)
{
++mGetTileCount;
Log(Debug::Debug) << "Processing db read job " << job->mId;
if (job->mInput.empty())
@ -865,7 +867,6 @@ namespace DetourNavigator
}
job->mCachedTileData = mDb->getTileData(job->mWorldspace, job->mChangedTile, job->mInput);
++mGetTileCount;
}
void DbWorker::processWritingJob(JobIt job)

@ -20,18 +20,15 @@ namespace DetourNavigator
out.setAttribute(
frameNumber, "NavMesh DbJobs Read", static_cast<double>(stats.mDb->mJobs.mReadingJobs));
if (stats.mDb->mGetTileCount > 0)
out.setAttribute(frameNumber, "NavMesh DbCacheHitRate",
static_cast<double>(stats.mDbGetTileHits) / static_cast<double>(stats.mDb->mGetTileCount)
* 100.0);
out.setAttribute(frameNumber, "NavMesh DbCache Get", static_cast<double>(stats.mDb->mGetTileCount));
out.setAttribute(frameNumber, "NavMesh DbCache Hit", static_cast<double>(stats.mDbGetTileHits));
}
out.setAttribute(frameNumber, "NavMesh CacheSize", static_cast<double>(stats.mCache.mNavMeshCacheSize));
out.setAttribute(frameNumber, "NavMesh UsedTiles", static_cast<double>(stats.mCache.mUsedNavMeshTiles));
out.setAttribute(frameNumber, "NavMesh CachedTiles", static_cast<double>(stats.mCache.mCachedNavMeshTiles));
if (stats.mCache.mGetCount > 0)
out.setAttribute(frameNumber, "NavMesh CacheHitRate",
static_cast<double>(stats.mCache.mHitCount) / stats.mCache.mGetCount * 100.0);
out.setAttribute(frameNumber, "NavMesh Cache Get", static_cast<double>(stats.mCache.mGetCount));
out.setAttribute(frameNumber, "NavMesh Cache Hit", static_cast<double>(stats.mCache.mHitCount));
}
}

@ -448,11 +448,13 @@ namespace Resource
"NavMesh Processing",
"NavMesh DbJobs Write",
"NavMesh DbJobs Read",
"NavMesh DbCacheHitRate",
"NavMesh DbCache Get",
"NavMesh DbCache Hit",
"NavMesh CacheSize",
"NavMesh UsedTiles",
"NavMesh CachedTiles",
"NavMesh CacheHitRate",
"NavMesh Cache Get",
"NavMesh Cache Hit",
"",
"Mechanics Actors",
"Mechanics Objects",

Loading…
Cancel
Save