Beispiel #1
0
        public static int Main(string[] args)
        {
            var options = new Options();
            if(!new CommandLineParser(new CommandLineParserSettings(Console.Out)).ParseArguments(args, options))
            {
                return 1;
            }
            if(!File.Exists(options.FileName))
            {
                Console.Write(options.GetUsage());
                Console.WriteLine("Could not find file \"{0}\".", options.FileName);
                return 1;
            }
            var resultsDb = new ResultsDb(options.FileName);
            IEnumerable<Result> results = resultsDb.GetAllResults().OrderBy(x => x.Date);
            if(options.Contains != null)
            {
                results = results.Where(x => x.Name.Contains(options.Contains));
            }
            foreach(var result in results)
            {
                Console.Out.WriteLine(string.Format("{0:dd-MM-yy HH:mm} {1} {2} {3:0.000}", result.Date, result.Name.PadRight(60),
                    (result.Average.NormalizeDecimal() + 's').PadRight(9), result.StandardDeviation / result.Average));
            }

            return 0;
        }
Beispiel #2
0
 public void InitFixture()
 {
     resultsDb = new ResultsDb(DbFileName);
 }
Beispiel #3
0
 public void InitFixture()
 {
     resultsDb = new ResultsDb(DbFileName);
 }