public void TestReferenceParallelJoinQuery(bool changeOptions, int bufferSize, int maxConcurrency, bool changeDegree, int maxDegree)
        {
            BenchmarkConfiguration bc = BenchmarkConfiguration.Instance;

            bc.MinIteration = 30;
            bc.MaxIteration = 30;

            string orders       = @"SELECT top 1000 c.SalesOrderId, f.SalesOrderDetailID FROM c join  f in c.orderdetails";
            string orderDetails = @"SELECT top 1000 * from c where IS_DEFINED(c.SalesOrderDetailID)";

            foreach (var iteration in Benchmark.Iterations)
            {
                CosmosDBPerformance.ReferenceDocument h = new CosmosDBPerformance.ReferenceDocument();
                using (iteration.StartMeasurement())
                {
                    h.GetReferenceData1(orders, orderDetails, changeOptions, bufferSize, maxConcurrency, changeDegree, maxDegree).GetAwaiter().GetResult();
                }
            }
        }
        public void TestReferenceParallelFunctionQuery(bool changeOptions, int bufferSize, int maxConcurrency, bool changeDegree, int maxDegree)
        {
            BenchmarkConfiguration bc = BenchmarkConfiguration.Instance;

            bc.MinIteration = 30;
            bc.MaxIteration = 30;

            string orders       = @"select top 1000 CONCAT(c.SalesOrderNumber, c.AccountNumber), c.SalesOrderId from c where ENDSWITH(c.SalesOrderNumber, '4', false)";
            string orderDetails = @"SELECT top 1000 * from c where IS_DEFINED(c.SalesOrderDetailID) and c.SalesOrderId='71783'";

            foreach (var iteration in Benchmark.Iterations)
            {
                CosmosDBPerformance.ReferenceDocument h = new CosmosDBPerformance.ReferenceDocument();
                using (iteration.StartMeasurement())
                {
                    h.GetReferenceData1(orders, orderDetails, changeOptions, bufferSize, maxConcurrency, changeDegree, maxDegree).GetAwaiter().GetResult();
                }
            }
        }
        public void TestReferenceParallelSumGroupQuery(bool changeOptions, int bufferSize, int maxConcurrency, bool changeDegree, int maxDegree)
        {
            BenchmarkConfiguration bc = BenchmarkConfiguration.Instance;

            bc.MinIteration = 30;
            bc.MaxIteration = 30;

            string orders       = @"SELECT top 1000 sum(c.TotalDue), c.CustomerId,c.SalesOrderId from c group by c.CustomerId, c.SalesOrderId";
            string orderDetails = @"SELECT top 1000 * from c where IS_DEFINED(c.SalesOrderDetailID) and c.SalesOrderId='71783'";

            foreach (var iteration in Benchmark.Iterations)
            {
                CosmosDBPerformance.ReferenceDocument h = new CosmosDBPerformance.ReferenceDocument();
                using (iteration.StartMeasurement())
                {
                    h.GetReferenceData1(orders, orderDetails, changeOptions, bufferSize, maxConcurrency, changeDegree, maxDegree).GetAwaiter().GetResult();
                }
            }
        }
        public void TestReferenceSimpleQuery(bool changeOptions, int buffer, int concurrency)
        {
            BenchmarkConfiguration bc = BenchmarkConfiguration.Instance;

            bc.MinIteration = 30;
            bc.MaxIteration = 30;

            string orders       = @"SELECT top 5000 * from c where IS_DEFINED(c.CustomerId)";
            string orderDetails = @"SELECT top 5000 * from c where IS_DEFINED(c.SalesOrderDetailID)";

            foreach (var iteration in Benchmark.Iterations)
            {
                CosmosDBPerformance.ReferenceDocument h = new CosmosDBPerformance.ReferenceDocument();
                using (iteration.StartMeasurement())
                {
                    h.GetReferenceData(orders, orderDetails, changeOptions, buffer, concurrency).GetAwaiter().GetResult();
                }
            }
        }