Add pathfinders to new profiler
This was SVN commit r10633.
This commit is contained in:
parent
2d017698e1
commit
4da8bf001f
@ -366,7 +366,7 @@ void CCmpPathfinder::ComputePath(entity_pos_t x0, entity_pos_t z0, const Goal& g
|
||||
{
|
||||
UpdateGrid();
|
||||
|
||||
PROFILE("ComputePath");
|
||||
PROFILE3("ComputePath");
|
||||
|
||||
PathfinderState state = { 0 };
|
||||
|
||||
@ -490,6 +490,11 @@ void CCmpPathfinder::ComputePath(entity_pos_t x0, entity_pos_t z0, const Goal& g
|
||||
m_DebugGrid = state.tiles;
|
||||
m_DebugSteps = state.steps;
|
||||
|
||||
PROFILE2_ATTR("from: (%d, %d)", i0, j0);
|
||||
PROFILE2_ATTR("to: (%d, %d)", state.iGoal, state.jGoal);
|
||||
PROFILE2_ATTR("reached: (%d, %d)", state.iBest, state.jBest);
|
||||
PROFILE2_ATTR("steps: %d", state.steps);
|
||||
|
||||
#if PATHFIND_STATS
|
||||
printf("PATHFINDER: steps=%d avgo=%d proc=%d impc=%d impo=%d addo=%d\n", state.steps, state.sumOpenSize/state.steps, state.numProcessed, state.numImproveClosed, state.numImproveOpen, state.numAddToOpen);
|
||||
#endif
|
||||
|
@ -499,7 +499,7 @@ void CCmpPathfinder::ComputeShortPath(const IObstructionTestFilter& filter,
|
||||
{
|
||||
UpdateGrid(); // TODO: only need to bother updating if the terrain changed
|
||||
|
||||
PROFILE("ComputeShortPath");
|
||||
PROFILE3("ComputeShortPath");
|
||||
// ScopeTimer UID__(L"ComputeShortPath");
|
||||
|
||||
m_DebugOverlayShortPathLines.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user