-
Notifications
You must be signed in to change notification settings - Fork 533
Expand file tree
/
Copy pathrun.sh
More file actions
132 lines (116 loc) · 6.45 KB
/
run.sh
File metadata and controls
132 lines (116 loc) · 6.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/bin/bash
if [ -z "$ACCOUNT_ENDPOINT" ]
then
echo "Missing ACCOUNT_ENDPOINT"
exit -1
fi
if [ -z "$ACCOUNT_KEY" ]
then
echo "Missing ACCOUNT_KEY"
exit -1
fi
if [ -z "$RESULTS_PK" ]
then
echo "Missing RESULTS_PK"
exit -1
fi
if [ -z "$PL" ]
then
echo "Missing PL"
exit -1
fi
if [ -z "$INCLUDE_QUERY" ]
then
echo "Missing INCLUDE_QUERY"
exit -1
fi
COMMIT_ID=$(git log -1 | head -n 1 | cut -d ' ' -f 2)
COMMIT_DATE=$(git log -1 --date=format:'%Y-%m-%d %H:%M:%S' | grep Date | cut -f 2- -d ':' | sed 's/^[ \t]*//;s/[ \t]*$//' | cut -f 1 -d ' ')
COMMIT_TIME=$(git log -1 --date=format:'%Y-%m-%d %H:%M:%S' | grep Date | cut -f 2- -d ':' | sed 's/^[ \t]*//;s/[ \t]*$//' | cut -f 2 -d ' ')
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
echo $COMMIT_ID
echo $COMMIT_DATE
echo $COMMIT_TIME
echo $BRANCH_NAME
if [ "$THINCLIENT_ENABLED" = true ]; then
# ThinClient operations
if [ -z "$THINCLIENT_ENDPOINT" ]
then
echo "Missing THINCLIENT_ENDPOINT"
exit -1
fi
if [ -z "$THINCLIENT_KEY" ]
then
echo "Missing THINCLIENT_KEY"
exit -1
fi
for WORKLOAD_NAME in \
CreateItemV3BenchmarkOperation \
CreateItemStreamV3BenchmarkOperation \
ReadItemV3BenchmarkOperation \
ReadItemStreamV3BenchmarkOperation \
ReplaceItemV3BenchmarkOperation \
ReplaceItemStreamV3BenchmarkOperation \
UpsertItemV3BenchmarkOperation \
UpsertItemStreamV3BenchmarkOperation \
DeleteItemV3BenchmarkOperation \
DeleteItemStreamV3BenchmarkOperation
do
dotnet run -c Release \
-- -n 2000000 \
-w $WORKLOAD_NAME \
--pl $PL \
-e $ACCOUNT_ENDPOINT \
-k $ACCOUNT_KEY \
--thinclientendpoint $THINCLIENT_ENDPOINT \
--thinclientkey $THINCLIENT_KEY \
--isthinclientenabled $THINCLIENT_ENABLED \
--enablelatencypercentiles \
--disablecoresdklogging \
--publishresults \
--resultspartitionkeyvalue $RESULTS_PK \
--commitid $COMMIT_ID \
--commitdate $COMMIT_DATE \
--committime $COMMIT_TIME \
--branchname $BRANCH_NAME \
--database testdb \
--container testcol \
--partitionkeypath /pk
sleep 10
done
else
if [ -z "$TELEMETRY_ENDPOINT" ]
then
echo "Missing TELEMETRY_ENDPOINT"
exit -1
fi
# 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
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
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
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
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
sleep 45 #Wait
if [ "$INCLUDE_QUERY" = true ]
then
#Query operations
# n value is lowered to 200000 because queries are significantly slower. This prevents the runs from taking to long.
# 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
sleep 10 #Wait
done
fi
fi