Example #1
0
        static void Main(string[] args)
        {
            var test    = new GoodDataServices();
            var badTest = new BadDataService();

            //You can comment, or uncomment various items below to see the impacts of each query

            //Complex query example
            //var result = test.CountOfCourseSessionsByDepartment("Marketing");

            var timer = new Stopwatch();

            timer.Start();
            //var schools = test.SearchSchools(null, null, 0, 25);
            //badTest.SearchSchoolsReallyBad(null, "IA", 0, 25);
            var limited = test.SearchSchools("Testing", "IA", 0, 25);

            //var withProject = test.SearchWithProjection("Testing", "IA", 0, 25);
            //PerfTestGood();
            //PerfTestBad();
            timer.Stop();
            Console.WriteLine($"Elapsed time: {timer.Elapsed}");

            Console.Read();
        }
Example #2
0
        public static void PerfTestGood()
        {
            Console.WriteLine("Starting good test");
            var test  = new GoodDataServices();
            var timer = new Stopwatch();

            timer.Start();
            for (var i = 1; i < 200; i++)
            {
                test.SearchWithProjection(null, "IA", 0, 25);
            }
            timer.Stop();
            Console.WriteLine($"Elapsed time: {timer.Elapsed}");
        }