mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 09:15:38 +00:00
Report more stats from AsyncNavMeshUpdater
This commit is contained in:
parent
431501e23a
commit
0f11acf709
2 changed files with 12 additions and 2 deletions
|
@ -234,13 +234,20 @@ namespace DetourNavigator
|
|||
void AsyncNavMeshUpdater::reportStats(unsigned int frameNumber, osg::Stats& stats) const
|
||||
{
|
||||
std::size_t jobs = 0;
|
||||
std::size_t waiting = 0;
|
||||
std::size_t pushed = 0;
|
||||
|
||||
{
|
||||
const std::lock_guard<std::mutex> lock(mMutex);
|
||||
jobs = mJobs.size();
|
||||
waiting = mWaiting.size();
|
||||
pushed = mPushed.size();
|
||||
}
|
||||
|
||||
stats.setAttribute(frameNumber, "NavMesh UpdateJobs", jobs);
|
||||
stats.setAttribute(frameNumber, "NavMesh Jobs", jobs);
|
||||
stats.setAttribute(frameNumber, "NavMesh Waiting", waiting);
|
||||
stats.setAttribute(frameNumber, "NavMesh Pushed", pushed);
|
||||
stats.setAttribute(frameNumber, "NavMesh Processing", mProcessingTiles.lockConst()->size());
|
||||
|
||||
mNavMeshTilesCache.reportStats(frameNumber, stats);
|
||||
}
|
||||
|
|
|
@ -390,7 +390,10 @@ void StatsHandler::setUpScene(osgViewer::ViewerBase *viewer)
|
|||
"Land",
|
||||
"Composite",
|
||||
"",
|
||||
"NavMesh UpdateJobs",
|
||||
"NavMesh Jobs",
|
||||
"NavMesh Waiting",
|
||||
"NavMesh Pushed",
|
||||
"NavMesh Processing",
|
||||
"NavMesh CacheSize",
|
||||
"NavMesh UsedTiles",
|
||||
"NavMesh CachedTiles",
|
||||
|
|
Loading…
Reference in a new issue