Bechmark : Fixes benchmark runs (#4088)

* pk to result container

* set pk

* pk value fix

* update run.sh

* remove changes value

* remove telemetry service end point

* cleanup
This commit is contained in:
Sourabh Jain 2023-09-20 20:32:15 +05:30 коммит произвёл GitHub
Родитель 258d960ae3
Коммит 373ab9ec9d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 21 добавлений и 21 удалений

Просмотреть файл

@ -15,13 +15,18 @@ namespace CosmosBenchmark
/// </summary>
public class BenchmarkProgress
{
/// <summary>
/// Record item id
/// </summary>
[JsonProperty]
public string id { get; set; }
/// <summary>
/// Record item pk
/// </summary>
[JsonProperty]
public string pk { get; set; }
/// <summary>
/// Machine name
/// </summary>

Просмотреть файл

@ -177,7 +177,6 @@ namespace CosmosBenchmark
Utility.TeePrint("Starting Inserts with {0} tasks", taskCount);
string partitionKeyPath = containerResponse.Resource.PartitionKeyPath;
int opsPerTask = config.ItemCount / taskCount;
@ -217,7 +216,6 @@ namespace CosmosBenchmark
}
runSummary.ConsistencyLevel = consistencyLevel;
BenchmarkProgress benchmarkProgress = await CompleteBenchmarkProgressStatus(benchmarkProgressItem, resultContainer);
if (config.PublishResults)
{
@ -348,11 +346,12 @@ namespace CosmosBenchmark
id = Environment.MachineName,
MachineName = Environment.MachineName,
JobStatus = "STARTED",
JobStartTime = DateTime.Now
JobStartTime = DateTime.Now,
pk = Environment.MachineName
};
ItemResponse<BenchmarkProgress> itemResponse = await resultContainer.UpsertItemAsync(
benchmarkProgress, new PartitionKey(benchmarkProgress.id));
benchmarkProgress, new PartitionKey(benchmarkProgress.pk));
return itemResponse.Resource;
}
@ -378,7 +377,10 @@ namespace CosmosBenchmark
private static async Task<Container> GetResultContainer(BenchmarkConfig config, CosmosClient cosmosClient)
{
Database database = cosmosClient.GetDatabase(config.ResultsDatabase ?? config.Database);
ContainerResponse containerResponse = await database.CreateContainerIfNotExistsAsync(id: config.ResultsContainer, partitionKeyPath: "/id");
ContainerResponse containerResponse = await database
.CreateContainerIfNotExistsAsync(
id: config.ResultsContainer,
partitionKeyPath: "/pk");
return containerResponse.Container;
}

Просмотреть файл

@ -114,9 +114,9 @@ Copyright (C) 2019 CosmosBenchmark
--branchname Branch name, only for publish
--resultspartitionkeyvalue Partitionkey, only for publish
--disablecoresdklogging Disable core SDK logging
--enabletelemetry Enable Telemetry
--enabletelemetry Enable Telemetry Feature
--telemetryscheduleinsec Telemetry Schedule in Seconds
--telemetryendpoint Telemetry Endpoint
--enableDistributedTracing Enable Distributed Tracing Feature
--resultsendpoint Endpoint to publish results to
--resultskey Key to publish results to
--resultsdatabase Database to publish results to

Просмотреть файл

@ -7,7 +7,6 @@ export PL=18
#These must be configured
export ACCOUNT_ENDPOINT=
export ACCOUNT_KEY=
export TELEMETRY_ENDPOINT=
#Loop forever
i=0

Просмотреть файл

@ -24,12 +24,6 @@ then
exit -1
fi
if [ -z "$TELEMETRY_ENDPOINT" ]
then
echo "Missing TELEMETRY_ENDPOINT"
exit -1
fi
if [ -z "$INCLUDE_QUERY" ]
then
echo "Missing INCLUDE_QUERY"
@ -47,26 +41,26 @@ echo $COMMIT_TIME
echo $BRANCH_NAME
# Client telemetry disabled ReadStreamExistsV3
dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --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
dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --tcp 10 --pl $PL -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --disableClientTelemetry --disableDistributedTracing --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --partitionkeypath /pk --container testcol
sleep 10 #Wait
# Client telemetry enabled ReadStreamExistsV3. This is needed to see the impact of client telemetry.
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
dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --WorkloadName ReadStreamExistsV3WithTelemetry --telemetryScheduleInSec 60 --disableDistributedTracing --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 --partitionkeypath /pk --container testcol
sleep 10 #Wait
# Open telemetry enabled ReadStreamExistsV3. This is needed to see the impact of distributed tracing (without listener)
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
dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --WorkloadName ReadStreamExistsV3WithDistributedTracingWOListener --disableClientTelemetry --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 --partitionkeypath /pk --container testcol
sleep 10 #Wait
#Point read operations
for WORKLOAD_NAME in ReadNotExistsV3 ReadTExistsV3 ReadStreamExistsWithDiagnosticsV3
do
dotnet run -c Release -- -n 2000000 -w $WORKLOAD_NAME --pl $PL --enableTelemetry --telemetryScheduleInSec 60 --telemetryEndpoint $TELEMETRY_ENDPOINT --tcp 10 -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
dotnet run -c Release -- -n 2000000 -w $WORKLOAD_NAME --pl $PL --telemetryScheduleInSec 60 --tcp 10 -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 --partitionkeypath /pk --container testcol
sleep 10 #Wait
done
#Insert operation
dotnet run -c Release -- -n 2000000 -w InsertV3 --pl 30 --enableTelemetry --telemetryScheduleInSec 60 --telemetryEndpoint $TELEMETRY_ENDPOINT --tcp 1 -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
dotnet run -c Release -- -n 2000000 -w InsertV3 --pl 30 --telemetryScheduleInSec 60 --tcp 1 -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 --partitionkeypath /pk --container testcol
sleep 45 #Wait
if [ "$INCLUDE_QUERY" = true ]
@ -76,7 +70,7 @@ then
# pl is 16 because 18 was casuing a small amount of thorrtles.
for WORKLOAD_NAME in ReadFeedStreamV3 QueryTSinglePkV3 QueryTSinglePkOrderByWithPaginationV3 QueryTSinglePkOrderByFullDrainV3 QueryTCrossPkV3 QueryTCrossPkOrderByWithPaginationV3 QueryTCrossPkOrderByFullDrainV3 QueryStreamSinglePkV3 QueryStreamSinglePkOrderByWithPaginationV3 QueryStreamSinglePkOrderByFullDrainV3 QueryStreamCrossPkV3 QueryStreamCrossPkOrderByWithPaginationV3 QueryStreamCrossPkOrderByFullDrainV3
do
dotnet run -c Release -- -n 200000 -w $WORKLOAD_NAME --pl 16 --enableTelemetry --telemetryScheduleInSec 60 --telemetryEndpoint $TELEMETRY_ENDPOINT --tcp 10 -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
dotnet run -c Release -- -n 200000 -w $WORKLOAD_NAME --pl 16 --telemetryScheduleInSec 60 --tcp 10 -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 --partitionkeypath /pk --container testcol
sleep 10 #Wait
done
fi