Skip to content

Commit cd8c1f1

Browse files
committed
add config
1 parent 6b1fa03 commit cd8c1f1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ public class BenchmarkConfig
101101
[Option(Required = false, HelpText = "Enable Client Telemetry")]
102102
public bool EnableTelemetry { get; set; }
103103

104+
[Option(Required = false, HelpText = "Enable Distributed Tracing")]
105+
public bool EnableDistributedTracing { get; set; }
106+
104107
[Option(Required = false, HelpText = "Client Telemetry Schedule in Seconds")]
105108
public int TelemetryScheduleInSec { get; set; }
106109

@@ -219,6 +222,8 @@ internal Microsoft.Azure.Cosmos.CosmosClient CreateCosmosClient(string accountKe
219222
clientOptions.ConsistencyLevel = (Microsoft.Azure.Cosmos.ConsistencyLevel)Enum.Parse(typeof(Microsoft.Azure.Cosmos.ConsistencyLevel), this.ConsistencyLevel, ignoreCase: true);
220223
}
221224

225+
clientOptions.EnableDistributedTracing = this.EnableDistributedTracing;
226+
222227
return new Microsoft.Azure.Cosmos.CosmosClient(
223228
this.EndPoint,
224229
accountKey,

Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ sleep 10 #Wait
5454
dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --WorkloadName ReadStreamExistsV3WithTelemetry --enableTelemetry --telemetryScheduleInSec 60 --telemetryEndpoint $TELEMETRY_ENDPOINT --tcp 10 --pl $PL -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --container testcol --partitionkeypath /pk
5555
sleep 10 #Wait
5656

57-
# Open telemetry enabled ReadStreamExistsV3. This is needed to see the impact of open telemetry.
58-
dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --WorkloadName ReadStreamExistsV3WithOpenTelemetry --enableOpenTelemetry --tcp 10 --pl $PL -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --container testcol --partitionkeypath /pk
57+
# Open telemetry enabled ReadStreamExistsV3. This is needed to see the impact of distributed tracing (without listener)
58+
dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --WorkloadName ReadStreamExistsV3WithDistributedTracingWOListener --enableDistributedTracing --tcp 10 --pl $PL -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --container testcol --partitionkeypath /pk
5959
sleep 10 #Wait
6060

6161
#Point read operations

0 commit comments

Comments
 (0)