Example #1
0
        private static void SameTimeBigList()
        {
            SameTime           sameTime  = new SameTime( );
            TimeDiffCalculator timerDiff = new TimeDiffCalculator("Big");

            timerDiff.Start();
            sameTime.IsFirstElementNull(ListOfOneMillonItems);
            timerDiff.Finish();
        }
Example #2
0
        private static void SameTimeTestSmallList()
        {
            SameTime           sameTime  = new SameTime();
            TimeDiffCalculator timerDiff = new TimeDiffCalculator("Small");

            timerDiff.Start();
            sameTime.IsFirstElementNull(ListOfHundredThousandItems);
            timerDiff.Finish();
        }
Example #3
0
        private static void GrowLinearly2()
        {
            PerformanceGrowLinearly performanceGrowLinearly = new PerformanceGrowLinearly();
            TimeDiffCalculator      timerDiff = new TimeDiffCalculator("GrowLinearly2");

            timerDiff.Start();
            bool ItemFound = performanceGrowLinearly.ContainsValue(ListOfOneMillonItems, "Item999999");

            timerDiff.Finish();
            if (ItemFound == true)
            {
                Console.WriteLine("Item999999 exist.");
            }
        }
Example #4
0
        private static void SquareOfTheSize2()
        {
            O_N2_ performanceGrowLinearly = new O_N2_();
            TimeDiffCalculator timerDiff  = new TimeDiffCalculator("SquareOfTheSize2");

            ListOfOneMillonItems[999998] = "Item888888";
            timerDiff.Start();
            bool isDuplicated = performanceGrowLinearly.ContainsDuplicates(ListOfOneMillonItems);

            timerDiff.Finish();
            if (isDuplicated)
            {
                Console.WriteLine("Item duplicated");
            }
            else
            {
                Console.WriteLine("Item not duplicated");
            }
        }