Example #1
0
        private static void WritePerfData(string name, IStoragePerformanceTest test, IEnumerable <PerformanceRecord> writeSeq)
        {
            if (!EnableCsvOutput)
            {
                return;
            }

            using (var file = File.Open(name + "_" + test.GetType().Name + ".csv", FileMode.Create))
                using (var writer = new StreamWriter(file, Encoding.UTF8))
                {
                    writer.WriteLine("Items,Time,Duration");
                    foreach (var p in writeSeq)
                    {
                        writer.WriteLine("{0},{1},{2}", p.ProcessedItems, p.Time, p.Duration);
                    }
                }
        }
Example #2
0
        private static void WritePerfData(string name, IStoragePerformanceTest test, IEnumerable<PerformanceRecord> writeSeq)
        {
            if (!EnableCsvOutput)
                return;

            using (var file = File.Open(name + "_" + test.GetType().Name + ".csv", FileMode.Create))
            using (var writer = new StreamWriter(file, Encoding.UTF8))
            {
                writer.WriteLine("Items,Time,Duration");
                foreach (var p in writeSeq)
                {
                    writer.WriteLine("{0},{1},{2}", p.ProcessedItems, p.Time, p.Duration);
                }
            }
        }