add a benchmark mode
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -39,6 +40,19 @@ namespace OpenRA.Mods.Common.LoadScreens
|
||||
Ui.ResetAll();
|
||||
Game.Settings.Save();
|
||||
|
||||
if (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;
|
||||
}
|
||||
|
||||
// Join a server directly
|
||||
var connect = Launch.GetConnectAddress();
|
||||
if (!string.IsNullOrEmpty(connect))
|
||||
|
||||
Reference in New Issue
Block a user