From 60b4e442443a294ffd702558550a318504f1b3cb Mon Sep 17 00:00:00 2001 From: glax Date: Thu, 25 Jul 2024 02:28:20 +0200 Subject: [PATCH] Add time taken --- Graph_Renderer/Program.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Graph_Renderer/Program.cs b/Graph_Renderer/Program.cs index ec62c50..09b129c 100644 --- a/Graph_Renderer/Program.cs +++ b/Graph_Renderer/Program.cs @@ -42,8 +42,14 @@ Logger logger = new(LogLevel.Information, consoleOut: Console.Out); if (!arguments.ContainsKey(benchmarkArg)) { + DateTime start = DateTime.Now; Route r = new Astar().FindPath(startLat, startLon, endLat, endLon, regionSize, true, PathMeasure.Time, 300, importPathVal[0], logger); - Renderer.Render(r, 20000, exportRenderPath[0]); + DateTime end = DateTime.Now; + logger.LogInformation($"Found path in {end - start:hh\\:mm\\:ss\\.fff}"); + Renderer.Render(r, 25000, exportRenderPath[0]); + DateTime rendered = DateTime.Now; + logger.LogInformation($"Rendered in {rendered - end:hh\\:mm\\:ss\\.fff}"); + 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);