mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:29:50 +00:00
Simulation replay profiling graph overhaul.
Support multiple graphs with different scales, units, rounding and descriptions and use it for memory allocation and number of garbage collections. Have the X axis in number of turns (instead of that divided by 20). Don't have the legend hide part of the graph. Add references to that hardcoded 20. Move graph JS to a separate JS file. Use JSON instead of JS. Add legal html structure. Comments By: Vladislav in irc yesterday This was SVN commit r21602.
This commit is contained in:
@@ -42,6 +42,12 @@
|
||||
#include <ctime>
|
||||
#include <fstream>
|
||||
|
||||
/**
|
||||
* Number of turns between two saved profiler snapshots.
|
||||
* Keep in sync with source/tools/replayprofile/graph.js
|
||||
*/
|
||||
static const int PROFILE_TURN_INTERVAL = 20;
|
||||
|
||||
CReplayLogger::CReplayLogger(const ScriptInterface& scriptInterface) :
|
||||
m_ScriptInterface(scriptInterface), m_Stream(NULL)
|
||||
{
|
||||
@@ -234,13 +240,11 @@ void CReplayPlayer::Replay(bool serializationtest, int rejointestturn, bool oosl
|
||||
|
||||
g_Profiler.Frame();
|
||||
|
||||
if (turn % 20 == 0)
|
||||
if (turn % PROFILE_TURN_INTERVAL == 0)
|
||||
g_ProfileViewer.SaveToFile();
|
||||
}
|
||||
else
|
||||
{
|
||||
debug_printf("Unrecognised replay token %s\n", type.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user