예제 #1
0
        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());
            }
        }
예제 #2
0
        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());
            }
        }
예제 #3
0
        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());
            }
        }
예제 #4
0
        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());
            }
        }
예제 #5
0
        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());
            }
        }
예제 #6
0
        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());
            }
        }