Add argument to benchmark parameter as output directory

This commit is contained in:
glax 2024-07-29 01:37:16 +02:00
parent c7a0d8da41
commit c3e69cb2a9

View File

@ -19,7 +19,7 @@ Argument regionArg = new (["-r", "--regionSize"], 1, "Region-Size");
Argument importPathArg = new (["-i", "--importPath"], 1, "Region-Directory");
Argument routeCoordinateArg = new(["-c", "--route", "--coordinates"], 4, "Start and end coordinates");
Argument exportRenderPathArg = new(["-e", "--exportPath"], 1, "Export file path.");
Argument benchmarkArg = new(["-b", "--benchmark"], 0, "Run tests");
Argument benchmarkArg = new(["-b", "--benchmark"], 1, "Run tests");
ArgumentFetcher af = new ([regionArg, importPathArg, routeCoordinateArg, exportRenderPathArg, benchmarkArg]);
@ -52,7 +52,10 @@ if (!arguments.ContainsKey(benchmarkArg))
logger.LogInformation($"Total {rendered - start:hh\\:mm\\:ss\\.fff}");
}
else
Benchmark.Run(startLat, startLon, endLat, endLon, regionSize, importPathVal[0], Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "Benchmark"), logger);
{
Directory.CreateDirectory(arguments[benchmarkArg][0]);
Benchmark.Run(startLat, startLon, endLat, endLon, regionSize, importPathVal[0], arguments[benchmarkArg][0], logger);
}
logger.LogInformation("All done!");