Ejemplo n.º 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());
            }
        }
Ejemplo n.º 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());
            }
        }
Ejemplo n.º 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());
            }
        }
Ejemplo n.º 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());
            }
        }
Ejemplo n.º 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());
            }
        }
Ejemplo n.º 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());
            }
        }