static void MultipleSyncCallsTest_TestAllInOneWorker() { Console.WriteLine("Synchronous calls - All-in-one (C++/CLI) worker test:"); using (AllInOneWorker worker = new AllInOneWorker()) { Console.Write("Starting..."); worker.Start(); Parallel.ForEach(_tasksLoopCounts, t => { worker.ExecuteWorkerTask(t, t); }); worker.Stop(); Console.WriteLine(" - Finished."); worker.PrintStatistics(); _allInOneWorkerWorkingSeconds.Add(worker.GetWorkingSeconds()); } }
static void OneCallTest_TestAllInOneWorker() { Console.WriteLine("One call - All-in-one (C++/CLI) worker test:"); using (AllInOneWorker worker = new AllInOneWorker()) { Console.Write("Starting..."); worker.Start(); worker.QueueDemoWorkerTasks(); worker.Stop(); Console.WriteLine(" - Finished."); worker.PrintStatistics(); _allInOneWorkerWorkingSeconds.Add(worker.GetWorkingSeconds()); } }
static void MultipleCallsTest_TestAllInOneWorker() { Console.WriteLine("Multiple calls - All-in-one (C++/CLI) worker test:"); using (AllInOneWorker worker = new AllInOneWorker()) { Console.Write("Starting..."); worker.Start(); foreach (uint taskLoopCount in _tasksLoopCounts) { worker.QueueWorkerTask(taskLoopCount, taskLoopCount); } worker.Stop(); Console.WriteLine(" - Finished."); worker.PrintStatistics(); _allInOneWorkerWorkingSeconds.Add(worker.GetWorkingSeconds()); } }
private static void MultipleCallsTest_TestAllInOneWorker() { Console.WriteLine("Multiple calls - All-in-one (C++/CLI) worker test:"); using (AllInOneWorker worker = new AllInOneWorker()) { Console.Write("Starting..."); worker.Start(); foreach (uint taskLoopCount in _tasksLoopCounts) { worker.QueueWorkerTask(taskLoopCount, taskLoopCount); } worker.Stop(); Console.WriteLine(" - Finished."); worker.PrintStatistics(); _allInOneWorkerWorkingSeconds.Add(worker.GetWorkingSeconds()); } }
private static void MultipleSyncCallsTest_TestAllInOneWorker() { Console.WriteLine("Synchronous calls - All-in-one (C++/CLI) worker test:"); using (AllInOneWorker worker = new AllInOneWorker()) { Console.Write("Starting..."); worker.Start(); Parallel.ForEach(_tasksLoopCounts, t => { worker.ExecuteWorkerTask(t, t); }); worker.Stop(); Console.WriteLine(" - Finished."); worker.PrintStatistics(); _allInOneWorkerWorkingSeconds.Add(worker.GetWorkingSeconds()); } }
private static void OneCallTest_TestAllInOneWorker() { Console.WriteLine("One call - All-in-one (C++/CLI) worker test:"); using (AllInOneWorker worker = new AllInOneWorker()) { Console.Write("Starting..."); worker.Start(); worker.QueueDemoWorkerTasks(); worker.Stop(); Console.WriteLine(" - Finished."); worker.PrintStatistics(); _allInOneWorkerWorkingSeconds.Add(worker.GetWorkingSeconds()); } }