mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 18:32:36 +00:00
Do not measure total navmesh generation duration
This is not a useful thing anymore.
This commit is contained in:
parent
9460a8760e
commit
a99266a60e
@ -253,8 +253,6 @@ namespace DetourNavigator
|
||||
|
||||
const auto start = std::chrono::steady_clock::now();
|
||||
|
||||
const auto firstStart = setFirstStart(start);
|
||||
|
||||
const auto navMeshCacheItem = job.mNavMeshCacheItem.lock();
|
||||
|
||||
if (!navMeshCacheItem)
|
||||
@ -305,7 +303,6 @@ namespace DetourNavigator
|
||||
" generation=" << locked->getGeneration() <<
|
||||
" revision=" << locked->getNavMeshRevision() <<
|
||||
" time=" << std::chrono::duration_cast<FloatMs>(finish - start).count() << "ms" <<
|
||||
" total_time=" << std::chrono::duration_cast<FloatMs>(finish - firstStart).count() << "ms"
|
||||
" thread=" << std::this_thread::get_id();
|
||||
|
||||
return isSuccess(status);
|
||||
@ -327,7 +324,6 @@ namespace DetourNavigator
|
||||
|
||||
if (!mHasJob.wait_for(lock, std::chrono::milliseconds(10), hasJob))
|
||||
{
|
||||
mFirstStart.lock()->reset();
|
||||
if (mJobs.empty() && getTotalThreadJobsUnsafe() == 0)
|
||||
mDone.notify_all();
|
||||
return std::nullopt;
|
||||
@ -396,14 +392,6 @@ namespace DetourNavigator
|
||||
writeToFile(shared->lockConst()->getImpl(), mSettings.get().mNavMeshPathPrefix, navMeshRevision);
|
||||
}
|
||||
|
||||
std::chrono::steady_clock::time_point AsyncNavMeshUpdater::setFirstStart(const std::chrono::steady_clock::time_point& value)
|
||||
{
|
||||
const auto locked = mFirstStart.lock();
|
||||
if (!*locked)
|
||||
*locked = value;
|
||||
return *locked.get();
|
||||
}
|
||||
|
||||
void AsyncNavMeshUpdater::repost(Job&& job)
|
||||
{
|
||||
if (mShouldStop || job.mTryNumber > 2)
|
||||
|
@ -111,7 +111,6 @@ namespace DetourNavigator
|
||||
Jobs mJobs;
|
||||
std::map<osg::Vec3f, std::set<TilePosition>> mPushed;
|
||||
Misc::ScopeGuarded<TilePosition> mPlayerTile;
|
||||
Misc::ScopeGuarded<std::optional<std::chrono::steady_clock::time_point>> mFirstStart;
|
||||
NavMeshTilesCache mNavMeshTilesCache;
|
||||
Misc::ScopeGuarded<std::map<osg::Vec3f, std::map<TilePosition, std::thread::id>>> mProcessingTiles;
|
||||
std::map<osg::Vec3f, std::map<TilePosition, std::chrono::steady_clock::time_point>> mLastUpdates;
|
||||
@ -131,8 +130,6 @@ namespace DetourNavigator
|
||||
|
||||
void writeDebugFiles(const Job& job, const RecastMesh* recastMesh) const;
|
||||
|
||||
std::chrono::steady_clock::time_point setFirstStart(const std::chrono::steady_clock::time_point& value);
|
||||
|
||||
void repost(Job&& job);
|
||||
|
||||
std::thread::id lockTile(const osg::Vec3f& agentHalfExtents, const TilePosition& changedTile);
|
||||
|
Loading…
x
Reference in New Issue
Block a user