コード例 #1
0
        public void TestHierarchySumGroupquery(bool changeOptions, int buffer, int concurrency)
        {
            BenchmarkConfiguration bc = BenchmarkConfiguration.Instance;

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


            foreach (var iteration in Benchmark.Iterations)
            {
                CosmosDBPerformance.EmbeddedDocuments h = new CosmosDBPerformance.EmbeddedDocuments();
                using (iteration.StartMeasurement())
                {
                    h.GetData("SELECT top 1000 sum(c.TotalDue), c.CustomerId from c group by c.CustomerId", changeOptions, buffer, concurrency).GetAwaiter().GetResult();
                }
            }
        }
コード例 #2
0
        public void TestHierarchyJoinquery(bool changeOptions, int buffer, int concurrency)
        {
            BenchmarkConfiguration bc = BenchmarkConfiguration.Instance;

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


            foreach (var iteration in Benchmark.Iterations)
            {
                CosmosDBPerformance.EmbeddedDocuments h = new CosmosDBPerformance.EmbeddedDocuments();
                using (iteration.StartMeasurement())
                {
                    h.GetData("SELECT top 1000 c.SalesOrderId, f.SalesOrderDetailID FROM c join  f in c.orderdetails", changeOptions, buffer, concurrency).GetAwaiter().GetResult();
                }
            }
        }
コード例 #3
0
        public void TestHierarchysimplequery(bool changeOptions, int buffer, int concurrency)
        {
            BenchmarkConfiguration bc = BenchmarkConfiguration.Instance;

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


            foreach (var iteration in Benchmark.Iterations)
            {
                CosmosDBPerformance.EmbeddedDocuments h = new CosmosDBPerformance.EmbeddedDocuments();
                using (iteration.StartMeasurement())
                {
                    h.GetData("SELECT TOP 5000 * FROM C", changeOptions, buffer, concurrency).GetAwaiter().GetResult();
                }
            }
        }
コード例 #4
0
        public void TestHierarchyWherequery(bool changeOptions, int buffer, int concurrency)
        {
            BenchmarkConfiguration bc = BenchmarkConfiguration.Instance;

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


            foreach (var iteration in Benchmark.Iterations)
            {
                CosmosDBPerformance.EmbeddedDocuments h = new CosmosDBPerformance.EmbeddedDocuments();
                using (iteration.StartMeasurement())
                {
                    h.GetData("select top 1000 * from c where c.SalesOrderId='71783'", changeOptions, buffer, concurrency).GetAwaiter().GetResult();
                }
            }
        }
コード例 #5
0
        public void TestHierarchyFunctionquery(bool changeOptions, int buffer, int concurrency)
        {
            BenchmarkConfiguration bc = BenchmarkConfiguration.Instance;

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


            foreach (var iteration in Benchmark.Iterations)
            {
                CosmosDBPerformance.EmbeddedDocuments h = new CosmosDBPerformance.EmbeddedDocuments();
                using (iteration.StartMeasurement())
                {
                    h.GetData("select top 1000 CONCAT(c.SalesOrderNumber, c.AccountNumber) from c where ENDSWITH(c.SalesOrderNumber, '4', false)", changeOptions, buffer, concurrency).GetAwaiter().GetResult();
                }
            }
        }