mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 19:53:53 +00:00
Merge branch 'navmesh_cache_metrics' into 'master'
Navmesh cache metrics See merge request OpenMW/openmw!3025
This commit is contained in:
commit
952bb016be
3 changed files with 10 additions and 10 deletions
|
@ -823,6 +823,8 @@ namespace DetourNavigator
|
||||||
|
|
||||||
void DbWorker::processReadingJob(JobIt job)
|
void DbWorker::processReadingJob(JobIt job)
|
||||||
{
|
{
|
||||||
|
++mGetTileCount;
|
||||||
|
|
||||||
Log(Debug::Debug) << "Processing db read job " << job->mId;
|
Log(Debug::Debug) << "Processing db read job " << job->mId;
|
||||||
|
|
||||||
if (job->mInput.empty())
|
if (job->mInput.empty())
|
||||||
|
@ -865,7 +867,6 @@ namespace DetourNavigator
|
||||||
}
|
}
|
||||||
|
|
||||||
job->mCachedTileData = mDb->getTileData(job->mWorldspace, job->mChangedTile, job->mInput);
|
job->mCachedTileData = mDb->getTileData(job->mWorldspace, job->mChangedTile, job->mInput);
|
||||||
++mGetTileCount;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DbWorker::processWritingJob(JobIt job)
|
void DbWorker::processWritingJob(JobIt job)
|
||||||
|
|
|
@ -20,18 +20,15 @@ namespace DetourNavigator
|
||||||
out.setAttribute(
|
out.setAttribute(
|
||||||
frameNumber, "NavMesh DbJobs Read", static_cast<double>(stats.mDb->mJobs.mReadingJobs));
|
frameNumber, "NavMesh DbJobs Read", static_cast<double>(stats.mDb->mJobs.mReadingJobs));
|
||||||
|
|
||||||
if (stats.mDb->mGetTileCount > 0)
|
out.setAttribute(frameNumber, "NavMesh DbCache Get", static_cast<double>(stats.mDb->mGetTileCount));
|
||||||
out.setAttribute(frameNumber, "NavMesh DbCacheHitRate",
|
out.setAttribute(frameNumber, "NavMesh DbCache Hit", static_cast<double>(stats.mDbGetTileHits));
|
||||||
static_cast<double>(stats.mDbGetTileHits) / static_cast<double>(stats.mDb->mGetTileCount)
|
|
||||||
* 100.0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
out.setAttribute(frameNumber, "NavMesh CacheSize", static_cast<double>(stats.mCache.mNavMeshCacheSize));
|
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 UsedTiles", static_cast<double>(stats.mCache.mUsedNavMeshTiles));
|
||||||
out.setAttribute(frameNumber, "NavMesh CachedTiles", static_cast<double>(stats.mCache.mCachedNavMeshTiles));
|
out.setAttribute(frameNumber, "NavMesh CachedTiles", static_cast<double>(stats.mCache.mCachedNavMeshTiles));
|
||||||
if (stats.mCache.mGetCount > 0)
|
out.setAttribute(frameNumber, "NavMesh Cache Get", static_cast<double>(stats.mCache.mGetCount));
|
||||||
out.setAttribute(frameNumber, "NavMesh CacheHitRate",
|
out.setAttribute(frameNumber, "NavMesh Cache Hit", static_cast<double>(stats.mCache.mHitCount));
|
||||||
static_cast<double>(stats.mCache.mHitCount) / stats.mCache.mGetCount * 100.0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -448,11 +448,13 @@ namespace Resource
|
||||||
"NavMesh Processing",
|
"NavMesh Processing",
|
||||||
"NavMesh DbJobs Write",
|
"NavMesh DbJobs Write",
|
||||||
"NavMesh DbJobs Read",
|
"NavMesh DbJobs Read",
|
||||||
"NavMesh DbCacheHitRate",
|
"NavMesh DbCache Get",
|
||||||
|
"NavMesh DbCache Hit",
|
||||||
"NavMesh CacheSize",
|
"NavMesh CacheSize",
|
||||||
"NavMesh UsedTiles",
|
"NavMesh UsedTiles",
|
||||||
"NavMesh CachedTiles",
|
"NavMesh CachedTiles",
|
||||||
"NavMesh CacheHitRate",
|
"NavMesh Cache Get",
|
||||||
|
"NavMesh Cache Hit",
|
||||||
"",
|
"",
|
||||||
"Mechanics Actors",
|
"Mechanics Actors",
|
||||||
"Mechanics Objects",
|
"Mechanics Objects",
|
||||||
|
|
Loading…
Reference in a new issue