-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0cddfe6
commit b6da5a4
Showing
4 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...Cosmos.Samples/Tools/Benchmark/v3/QueryStreamCrossPkWithPaginationV3BenchmarkOperation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
//------------------------------------------------------------ | ||
|
||
namespace CosmosBenchmark | ||
{ | ||
using Microsoft.Azure.Cosmos; | ||
|
||
internal class QueryStreamCrossPkWithPaginationV3BenchmarkOperation : QueryTV3BenchmarkOperation | ||
{ | ||
public QueryStreamCrossPkWithPaginationV3BenchmarkOperation( | ||
CosmosClient cosmosClient, | ||
string dbName, | ||
string containerName, | ||
string partitionKeyPath, | ||
string sampleJson) : base(cosmosClient, dbName, containerName, partitionKeyPath, sampleJson) | ||
{ | ||
} | ||
|
||
public override QueryDefinition QueryDefinition => new QueryDefinition("select * from T where T.id = @id") | ||
.WithParameter("@id", this.executionItemId); | ||
|
||
public override QueryRequestOptions QueryRequestOptions => new QueryRequestOptions() | ||
{ | ||
MaxItemCount = 1 | ||
}; | ||
|
||
public override bool IsCrossPartitioned => true; | ||
|
||
public override bool IsPaginationEnabled => true; | ||
|
||
public override bool IsQueryStream => true; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...osmos.Samples/Tools/Benchmark/v3/QueryStreamSinglePkWithPaginationV3BenchmarkOperation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
//------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
//------------------------------------------------------------ | ||
|
||
namespace CosmosBenchmark | ||
{ | ||
|
||
using Microsoft.Azure.Cosmos; | ||
|
||
internal class QueryStreamSinglePkWithPaginationV3BenchmarkOperation : QueryTV3BenchmarkOperation | ||
{ | ||
public QueryStreamSinglePkWithPaginationV3BenchmarkOperation( | ||
CosmosClient cosmosClient, | ||
string dbName, | ||
string containerName, | ||
string partitionKeyPath, | ||
string sampleJson) : base(cosmosClient, dbName, containerName, partitionKeyPath, sampleJson) | ||
{ | ||
} | ||
|
||
public override QueryDefinition QueryDefinition => new QueryDefinition("select * from T where T.id = @id") | ||
.WithParameter("@id", this.executionItemId); | ||
|
||
public override QueryRequestOptions QueryRequestOptions => new QueryRequestOptions() | ||
{ | ||
MaxItemCount= 1, | ||
PartitionKey = new PartitionKey(this.executionPartitionKey) | ||
}; | ||
|
||
public override bool IsCrossPartitioned => false; | ||
|
||
public override bool IsPaginationEnabled => true; | ||
|
||
public override bool IsQueryStream => true; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...zure.Cosmos.Samples/Tools/Benchmark/v3/QueryTCrossPkWithPaginationV3BenchmarkOperation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
//------------------------------------------------------------ | ||
|
||
namespace CosmosBenchmark | ||
{ | ||
using Microsoft.Azure.Cosmos; | ||
|
||
internal class QueryTCrossPkWithPaginationV3BenchmarkOperation : QueryTV3BenchmarkOperation | ||
{ | ||
public QueryTCrossPkWithPaginationV3BenchmarkOperation( | ||
CosmosClient cosmosClient, | ||
string dbName, | ||
string containerName, | ||
string partitionKeyPath, | ||
string sampleJson) : base(cosmosClient, dbName, containerName, partitionKeyPath, sampleJson) | ||
{ | ||
} | ||
|
||
public override QueryDefinition QueryDefinition => new QueryDefinition("select * from T where T.id = @id") | ||
.WithParameter("@id", this.executionItemId); | ||
|
||
public override QueryRequestOptions QueryRequestOptions => new QueryRequestOptions() | ||
{ | ||
MaxItemCount = 1 | ||
}; | ||
|
||
public override bool IsCrossPartitioned => true; | ||
|
||
public override bool IsPaginationEnabled => true; | ||
|
||
public override bool IsQueryStream => false; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...ure.Cosmos.Samples/Tools/Benchmark/v3/QueryTSinglePkWithPaginationV3BenchmarkOperation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
//------------------------------------------------------------ | ||
|
||
namespace CosmosBenchmark | ||
{ | ||
using Microsoft.Azure.Cosmos; | ||
|
||
internal class QueryTSinglePkWithPaginationV3BenchmarkOperation : QueryTV3BenchmarkOperation | ||
{ | ||
public QueryTSinglePkWithPaginationV3BenchmarkOperation( | ||
CosmosClient cosmosClient, | ||
string dbName, | ||
string containerName, | ||
string partitionKeyPath, | ||
string sampleJson) : base(cosmosClient, dbName, containerName, partitionKeyPath, sampleJson) | ||
{ | ||
} | ||
|
||
public override QueryDefinition QueryDefinition => new QueryDefinition("select * from T where T.id = @id") | ||
.WithParameter("@id", this.executionItemId); | ||
|
||
public override QueryRequestOptions QueryRequestOptions => new QueryRequestOptions() | ||
{ | ||
MaxItemCount = 1, | ||
PartitionKey = new PartitionKey(this.executionPartitionKey) | ||
}; | ||
|
||
public override bool IsCrossPartitioned => false; | ||
|
||
public override bool IsPaginationEnabled => true; | ||
|
||
public override bool IsQueryStream => false; | ||
} | ||
} |