mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-09 19:38:25 +00:00
add more DEBUG profiler to shavit-replay closestpos stuff
This commit is contained in:
parent
6c2a48aec5
commit
fdc5c1e82e
@ -1836,8 +1836,17 @@ bool DefaultLoadReplay(frame_cache_t cache, int style, int track)
|
|||||||
|
|
||||||
if (gB_ClosestPos)
|
if (gB_ClosestPos)
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
|
Profiler p = new Profiler();
|
||||||
|
p.Start();
|
||||||
|
#endif
|
||||||
delete gH_ClosestPos[track][style];
|
delete gH_ClosestPos[track][style];
|
||||||
gH_ClosestPos[track][style] = new ClosestPos(cache.aFrames);
|
gH_ClosestPos[track][style] = new ClosestPos(cache.aFrames);
|
||||||
|
#if DEBUG
|
||||||
|
p.Stop();
|
||||||
|
PrintToServer(">>> ClosestPos / DefaultLoadReplay(style=%d, track=%d) = %f", style, track, p.Time);
|
||||||
|
delete p;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -2704,8 +2713,17 @@ void DoReplaySaverCallbacks(int iSteamID, int client, int style, float time, int
|
|||||||
|
|
||||||
if (gB_ClosestPos)
|
if (gB_ClosestPos)
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
|
Profiler p = new Profiler();
|
||||||
|
p.Start();
|
||||||
|
#endif
|
||||||
delete gH_ClosestPos[track][style];
|
delete gH_ClosestPos[track][style];
|
||||||
gH_ClosestPos[track][style] = new ClosestPos(gA_FrameCache[style][track].aFrames);
|
gH_ClosestPos[track][style] = new ClosestPos(gA_FrameCache[style][track].aFrames);
|
||||||
|
#if DEBUG
|
||||||
|
p.Stop();
|
||||||
|
PrintToServer(">>> ClosestPos / DoReplaySaverCallbacks(style=%d, track=%d) = %f", style, track, p.Time);
|
||||||
|
delete p;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4126,7 +4144,7 @@ float GetClosestReplayTime(int client)
|
|||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
profiler.Stop();
|
profiler.Stop();
|
||||||
PrintToServer("client(%d) iClosestFrame(%fs) = %d", client, profiler.Time, iClosestFrame);
|
PrintToConsole(client, "iClosestFrame(%fs) = %d", client, profiler.Time, iClosestFrame);
|
||||||
delete profiler;
|
delete profiler;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user