/// <summary> /// Terminate the result thread and apply any required exit procedures. /// Save orders log files to disk. /// </summary> public override void Exit() { base.Exit(); lock (_sync) { if (_writer != null) { // only log final statistics and we want them to all be together foreach (var kvp in RuntimeStatistics.OrderBy(kvp => kvp.Key)) { WriteLine($"{kvp.Key,-15}\t{kvp.Value}"); } var end = DateTime.UtcNow; var delta = end - _testStartTime; WriteLine($"{end}: Completed regression test, took: {delta.TotalSeconds:0.0} seconds"); _writer.DisposeSafely(); _writer = null; } else { string line; while (_preInitializeLines.TryDequeue(out line)) { Console.WriteLine(line); } } } }