private static void RunAll(int workers, string folder) { //var v3 = new DupDetectorV3(); //Run(v3, workers, folder); var v2 = new DupDetectorV2(); Run(v2, workers, folder); var v1 = new DupDetector(); Run(v1, workers, folder); }
private static void PerfAll(int workers, string folder) { var times = 2; //var v3 = new DupDetectorV3(); //Perf(v3, workers, folder, times); var v2 = new DupDetectorV2(); Perf(v2, workers, folder, times); var v1 = new DupDetector(); Perf(v1, workers, folder, times); }
static void Main(string[] args) { Console.WriteLine("Please specify the folder to find dup files:"); //specify any files here var folder = Console.ReadLine(); if (Directory.Exists(folder)) { var workers = 5; Console.WriteLine("Please choose from the following options(press the number):"); Console.WriteLine("1 Find"); Console.WriteLine("2 Compare"); Console.WriteLine("3 Performance Testing"); var choice = Console.ReadKey(); Console.WriteLine(); Console.WriteLine("Started."); switch (choice.Key) { case ConsoleKey.D1: var v2 = new DupDetectorV2(); Run(v2, workers, folder); break; case ConsoleKey.D2: RunAll(workers, folder); break; case ConsoleKey.D3: PerfAll(workers, folder); break; } Console.WriteLine("Done."); } else { Console.WriteLine("Please make sure folder {0} exist", folder); } Console.ReadLine(); }