Writing benchmark data at the end of the game

This commit is contained in:
teinarss
2019-04-30 22:41:45 +02:00
committed by abcdefg30
parent 982291119c
commit 4fae77ed1c
5 changed files with 116 additions and 18 deletions

View File

@@ -45,17 +45,11 @@ namespace OpenRA.Mods.Common.LoadScreens
Ui.ResetAll();
Game.Settings.Save();
if (Launch.Benchmark)
if (!string.IsNullOrEmpty(Launch.Benchmark))
{
Log.AddChannel("cpu", "cpu.csv");
Log.Write("cpu", "tick;time [ms]");
Log.AddChannel("render", "render.csv");
Log.Write("render", "frame;time [ms]");
Console.WriteLine("Saving benchmark data into {0}".F(Path.Combine(Platform.SupportDir, "Logs")));
Game.BenchmarkMode = true;
Game.BenchmarkMode(Launch.Benchmark);
}
// Join a server directly
@@ -74,6 +68,13 @@ namespace OpenRA.Mods.Common.LoadScreens
}
}
// Start a map directly
if (!string.IsNullOrEmpty(Launch.Map))
{
Game.LoadMap(Launch.Map);
return;
}
// Load a replay directly
if (!string.IsNullOrEmpty(Launch.Replay))
{