Esempio n. 1
0
        /// <exclude/>
        public void TestThread()
        {
            lock (lockValue)
            {
                HiPerfTimer timer  = new HiPerfTimer();
                string      output = "";

                timer.Start();
                long   count1    = ValidateEnumerate5();
                double duration1 = timer.Duration;
                output = string.Format("{0:###,###,###,###} hands per second", count1 / duration1);
                FiveCardHandTypeLabel(output);

                timer.Start();
                long   count2    = InlineValidateEnumerate5();
                double duration2 = timer.Duration;
                output = string.Format("{0:###,###,###,###} hands per second", count2 / duration2);
                FiveCardHandTypeInlineLabel(output);

                timer.Start();
                long   count3    = ValidateEnumerate7();
                double duration3 = timer.Duration;
                output = string.Format("{0:###,###,###,###} hands per second", count3 / duration3);
                SevenCardHandTypeLabel(output);

                timer.Start();
                long   count4    = InlineValidateEnumerate7();
                double duration4 = timer.Duration;
                output = string.Format("{0:###,###,###,###} hands per second", count4 / duration4);
                SevenCardHandTypeInlinedLabel(output);

                timer.Start();
                count4    = FiveCardEvaluateBenchmark();
                duration4 = timer.Duration;
                output    = string.Format("{0:###,###,###,###} hands per second", count4 / duration4);
                FiveCardEvaluateLabel(output);

                timer.Start();
                count4    = FiveCardEvaluateBenchmarkInline();
                duration4 = timer.Duration;
                output    = string.Format("{0:###,###,###,###} hands per second", count4 / duration4);
                FiveCardEvaluateInlinedLabel(output);

                timer.Start();
                count4    = SevenCardEvaluateBenchmark();
                duration4 = timer.Duration;
                output    = string.Format("{0:###,###,###,###} hands per second", count4 / duration4);
                SevenCardEvaluateLabel(output);

                timer.Start();
                count4    = SevenCardEvaluateInlinedBenchmark();
                duration4 = timer.Duration;
                output    = string.Format("{0:###,###,###,###} hands per second", count4 / duration4);
                SevenCardEvaluateInlinedLabel(output);
            }
        }
Esempio n. 2
0
        public void Start()
        {
            var timer = new HiPerfTimer();

            _mapper.Initialize();

            timer.Start();

            for (int i = 0; i < 100000; i++)
            {
                _mapper.Map();
            }

            timer.Stop();

            Console.WriteLine("{0}: - {1} - Mapping time: \t{2}s", _mapper.Name, _mode, timer.Duration);
        }
Esempio n. 3
0
        public void Start()
        {
            var timer = new HiPerfTimer();

            _mapper.Initialize();
            _mapper.Map();

            timer.Start();

            for (int i = 0; i < 1000000; i++)
            {
                _mapper.Map();
            }

            timer.Stop();

            Console.WriteLine("{0}: - {1} - Mapping time: \t{2}s", _mapper.Name, _mode, timer.Duration);
        }
Esempio n. 4
0
        public void Start()
        {
            var timer = new HiPerfTimer();

            _mapper.Initialize();

            _mapper.Map();

            timer.Start();

            for (var i = 0; i < 1000000; i++)
            {
                _mapper.Map();
            }

            timer.Stop();

            Console.WriteLine($"{_mapper.Name}: - {_mode} - Mapping time: \t{timer.Duration}s");
        }
Esempio n. 5
0
        public void Start()
        {
            var timer = new HiPerfTimer();

            _mapper.Initialize();
            _mapper.Map();

            DataCollection.CommentMarkProfile(1, "Begin " + _mapper);
            timer.Start();

            for (int i = 0; i < 1000000; i++)
            {
                _mapper.Map();
            }

            timer.Stop();
            DataCollection.CommentMarkProfile(1, "End " + _mapper);

            Console.WriteLine("{0}: - {1} - Mapping time: \t{2}s", _mapper.Name, _mode, timer.Duration);
        }
Esempio n. 6
0
        /// <exclude/>
        public void TestThread()
        {
            lock (lockValue)
            {
                HiPerfTimer timer = new HiPerfTimer();
                string output = "";

                timer.Start();
                long count1 = ValidateEnumerate5();
                double duration1 = timer.Duration;
                output = string.Format("{0:###,###,###,###} hands per second", count1 / duration1);
                FiveCardHandTypeLabel(output);

                timer.Start();
                long count2 = InlineValidateEnumerate5();
                double duration2 = timer.Duration;
                output = string.Format("{0:###,###,###,###} hands per second", count2 / duration2);
                FiveCardHandTypeInlineLabel(output);

                timer.Start();
                long count3 = ValidateEnumerate7();
                double duration3 = timer.Duration;
                output = string.Format("{0:###,###,###,###} hands per second", count3 / duration3);
                SevenCardHandTypeLabel(output);

                timer.Start();
                long count4 = InlineValidateEnumerate7();
                double duration4 = timer.Duration;
                output = string.Format("{0:###,###,###,###} hands per second", count4 / duration4);
                SevenCardHandTypeInlinedLabel(output);

                timer.Start();
                count4 = FiveCardEvaluateBenchmark();
                duration4 = timer.Duration;
                output = string.Format("{0:###,###,###,###} hands per second", count4 / duration4);
                FiveCardEvaluateLabel(output);

                timer.Start();
                count4 = FiveCardEvaluateBenchmarkInline();
                duration4 = timer.Duration;
                output = string.Format("{0:###,###,###,###} hands per second", count4 / duration4);
                FiveCardEvaluateInlinedLabel(output);

                timer.Start();
                count4 = SevenCardEvaluateBenchmark();
                duration4 = timer.Duration;
                output = string.Format("{0:###,###,###,###} hands per second", count4 / duration4);
                SevenCardEvaluateLabel(output);

                timer.Start();
                count4 = SevenCardEvaluateInlinedBenchmark();
                duration4 = timer.Duration;
                output = string.Format("{0:###,###,###,###} hands per second", count4 / duration4);
                SevenCardEvaluateInlinedLabel(output);
            }
        }