Example #1
0
 public void RunSplitText()
 {
     foreach (var benchmarkDirPath in Directory.EnumerateDirectories(SplitTextDirPath).OrderBy(x => x))
     {
         var runner = new SplitTextRunner(benchmarkDirPath, Path.Combine(benchmarkDirPath, "report"));
         runner.Run();
     }
 }
Example #2
0
        public static int Main(string[] args)
        {
            Options.Parse(args);

            try
            {
                IRunner runner;
                if (Options.Command == Command.All)
                {
                    runner = new FullSuiteRunner(Options.BenchmarkSuiteDirPath);
                }
                else
                {
                    var benchmarkDirPath = Options.BenchmarkDirPath;
                    var reportDirPath    = Path.Combine(benchmarkDirPath, "report");
                    switch (Options.Command)
                    {
                    case Command.ExtractionText:
                        runner = new ExtractionTextRunner(benchmarkDirPath, reportDirPath);
                        break;

                    case Command.SplitText:
                        runner = new SplitTextRunner(benchmarkDirPath, reportDirPath);
                        break;

                    case Command.TransformationText:
                        runner = new TransformationTextRunner(benchmarkDirPath, reportDirPath);
                        break;

                    default:
                        Console.Error.WriteLine("No command specified. Exiting.");
                        return(-1);
                    }
                }

                runner.Run();
            }
            catch (Exception exc)
            {
                Console.Error.WriteLine(exc.ToString());
                return(-1);
            }

            return(0);
        }