Esempio n. 1
0
        private static void SameTimeBigList()
        {
            SameTime           sameTime  = new SameTime( );
            TimeDiffCalculator timerDiff = new TimeDiffCalculator("Big");

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

            timerDiff.Start();
            sameTime.IsFirstElementNull(ListOfHundredThousandItems);
            timerDiff.Finish();
        }
Esempio n. 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.");
            }
        }
Esempio n. 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");
            }
        }