예제 #1
0
        private void TestRun(CalculationType calcType, InsertionType insertType, int runCount, StreamWriter sw)
        {
            sw.Write($"{calcType.ToString()},{insertType.ToString()},");
            var iqmm     = new IncrementalIQMManager(PerformanceTestInputFilePath, calcType, insertType);
            var runtimes = new List <double>();

            for (var i = 0; i < runCount; i++)
            {
                var runtime = iqmm.Execute();
                runtimes.Add(runtime);
                sw.Write($"{runtime},");
            }
            var avgRuntime = runtimes.Sum() / runtimes.Count;

            sw.WriteLine(avgRuntime);
        }