Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark: Fixes build issues and adds gates #2698

Merged
merged 4 commits into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ internal CosmosClient CreateCosmosClient(string accountKey)
MaxRetryAttemptsOnRateLimitedRequests = 0,
MaxRequestsPerTcpConnection = this.MaxRequestsPerTcpConnection,
MaxTcpConnectionsPerEndpoint = this.MaxTcpConnectionsPerEndpoint,
#if ProjectRef
EnableClientTelemetry = this.EnableTelemetry
#endif
};

if (!string.IsNullOrWhiteSpace(this.ConsistencyLevel))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ internal class QueryTSinglePkV3BenchmarkOperation : IBenchmarkOperation

private readonly string executionItemPartitionKey;
private readonly string executionItemId;
private readonly QueryDefinition queryDefinition;
private readonly QueryRequestOptions queryRequestOptions;
private bool initialized = false;

public QueryTSinglePkV3BenchmarkOperation(
Expand Down
6 changes: 6 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ jobs:
VmImage: $(VmImage)

- template: templates/build-preview.yml
parameters:
BuildConfiguration: Release
Arguments: $(ReleaseArguments)
VmImage: $(VmImage)

- template: templates/build-benchmark.yml
parameters:
BuildConfiguration: Release
Arguments: $(ReleaseArguments)
Expand Down
27 changes: 27 additions & 0 deletions templates/build-benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# File: templates/build-benchmark.yml

parameters:
BuildConfiguration: ''
Arguments: ''
VmImage: ''

jobs:

- job:
displayName: CosmosBenchmark ${{ parameters.BuildConfiguration }}
pool:
vmImage: ${{ parameters.VmImage }}

steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching

- task: DotNetCoreCLI@2
displayName: Build Microsoft.Azure.CosmosBenchmark
inputs:
command: build
configuration: $(parameters.BuildConfiguration)
nugetConfigPath: NuGet.config
projects: 'Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.sln'
arguments: -p:Optimize=true
versioningScheme: OFF
21 changes: 20 additions & 1 deletion templates/build-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,23 @@ jobs:
arguments: ${{ parameters.Arguments }} --configuration ${{ parameters.BuildConfiguration }} /p:IsPreview=true /p:OS=${{ parameters.OS }}
publishTestResults: true
nugetConfigPath: NuGet.config
testRunTitle: Microsoft.Azure.Cosmos.Tests
testRunTitle: Microsoft.Azure.Cosmos.Tests

- job:
displayName: Preview CosmosBenchmark ${{ parameters.BuildConfiguration }}
pool:
vmImage: ${{ parameters.VmImage }}

steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching

- task: DotNetCoreCLI@2
displayName: Build Microsoft.Azure.CosmosBenchmark
inputs:
command: build
configuration: $(parameters.BuildConfiguration)
nugetConfigPath: NuGet.config
projects: 'Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.sln'
arguments: -p:Optimize=true -p:IsPreview=true
versioningScheme: OFF