Example #1
0
        private static async Task RunPipelined()
        {
            var b = new E2Ebenchmarks();

            b.NumEntities  = 10;
            b.DomainClient = DomainClientType.WcfBinary;
            b.Start();

            await b.GetCititesReuseContext();

            Console.WriteLine("PRESS KEY TO START");
            Console.ReadLine();

            var sw = Stopwatch.StartNew();

            await b.PipelinedLoadAsync(5000, 20);

            Console.WriteLine("RunPipelined elapsed time is {0} for 2 ", sw.Elapsed);


            sw = Stopwatch.StartNew();

            await b.PipelinedLoadAsync(5000, 50);

            Console.WriteLine("RunPipelined elapsed time is {0} for 4 ", sw.Elapsed);

            sw = Stopwatch.StartNew();

            await b.PipelinedLoadAsync(5000, 100);

            Console.WriteLine("RunPipelined elapsed time is {0} for 4 ", sw.Elapsed);

            b.Stop();
        }
Example #2
0
        private static async Task RunBenchmarksAsyncParallel()
        {
            var b = new E2Ebenchmarks();

            b.DomainClient = DomainClientType.WcfBinary;
            b.Start();

            await b.GetCititesReuseContext();

            var sw = Stopwatch.StartNew();
            await b.RunBenchmarksAsyncParallel(100, 2);

            Console.WriteLine("RunBenchmarksAsyncParallel elapsed time is {0}", sw.Elapsed);
            b.Stop();
        }