private static TimeSpan RunAzureSDKTest()
        {
            Console.WriteLine("Running the Azure SDK test...");

            TimeBlock block = new TimeBlock();

            RunAzureSDKTestInternal();

            block.End();
            return block.ElapsedTime;
        }
        private static TimeSpan RunWebJobsSDKTest(bool disableLogging)
        {
            Console.WriteLine("Running the WebJobs SDK test...");

            TimeBlock block = new TimeBlock();

            RunWebJobsSDKTestInternal(disableLogging);

            block.End();
            return block.ElapsedTime;
        }
        private static TimeBlock RunWebJobsSDKTestInternal(bool disableLogging)
        {
            JobHostConfiguration hostConfig = new JobHostConfiguration(_connectionString);
            hostConfig.Queues.BatchSize = BatchSize;
            hostConfig.NameResolver = _nameResolver;
            hostConfig.TypeLocator = new FakeTypeLocator(typeof(QueueOverheadPerfTest));

            if (disableLogging)
            {
                hostConfig.DashboardConnectionString = null;
            }

            _receivedMessages = 0;

            using (_firstMessagesReceivedEvent = new ManualResetEvent(initialState: false))
            using (_allMessagesReceivedEvent = new ManualResetEvent(initialState: false))
            using (JobHost host = new JobHost(hostConfig))
            {
                host.Start();

                _firstMessagesReceivedEvent.WaitOne();
                TimeBlock block = new TimeBlock();
                _allMessagesReceivedEvent.WaitOne();
                block.End();

                return block;
            }
        }