private static void MeasureAverageCalc(string header, IStockTradeHistory sth) { watch.Restart(); sth.GetAverages(); long mSecs = watch.ElapsedMilliseconds; Console.WriteLine($"{header} took {mSecs} msecs."); }
private static void PrintAverages(string header, IStockTradeHistory sth) { Console.WriteLine(header); foreach (var average in sth.GetAverages()) { Console.WriteLine($"{average.Key} @ {average.Value:F3}"); } Console.WriteLine(); }