public void Run() { var inputValuePairs = RequestInput(); var gridCommands = _testService.CreateFakeGridCommandsLists(inputValuePairs["NumberOfCommands"]); var timeEntries = new List <TimeSpan>(); for (int i = 1; i <= inputValuePairs["NumberOfRuns"]; i++) { var sw = new Stopwatch(); sw.Start(); // You'll have to change the service if you want to test the original solution var coordinate = _basicIntersectionGridService.GetClosestIntersection(gridCommands); sw.Stop(); timeEntries.Add(sw.Elapsed); } Console.WriteLine($"It took an average of {timeEntries.Average(t => t.TotalSeconds)} seconds to get the closest intersection"); Console.ReadLine(); }