File tree Expand file tree Collapse file tree 4 files changed +62
-5
lines changed Expand file tree Collapse file tree 4 files changed +62
-5
lines changed Original file line number Diff line number Diff line change @@ -162,9 +162,23 @@ functions:
162
162
163
163
# Send dashboard data
164
164
send dashboard data :
165
- - command : perf.send
165
+ - command : subprocess.exec
166
+ params :
167
+ binary : bash
168
+ args :
169
+ - .evergreen/scripts/perf-submission-setup.sh
170
+ working_dir : src
171
+ type : test
172
+ - command : expansions.update
166
173
params :
167
- file : src/results.json
174
+ file : src/expansion.yml
175
+ - command : subprocess.exec
176
+ params :
177
+ binary : bash
178
+ args :
179
+ - .evergreen/scripts/perf-submission.sh
180
+ working_dir : src
181
+ type : test
168
182
169
183
# Setup system
170
184
setup system :
Original file line number Diff line number Diff line change 41
41
ec2_assume_role ,
42
42
expansions_update ,
43
43
git_get_project ,
44
- perf_send ,
45
44
)
46
45
from shrub .v3 .evg_task import EvgTask , EvgTaskDependency , EvgTaskRef
47
46
@@ -1103,8 +1102,12 @@ def create_attach_benchmark_test_results_func():
1103
1102
1104
1103
1105
1104
def create_send_dashboard_data_func ():
1106
- cmd = perf_send (file = "src/results.json" )
1107
- return "send dashboard data" , [cmd ]
1105
+ cmds = [
1106
+ get_subprocess_exec (args = [".evergreen/scripts/perf-submission-setup.sh" ]),
1107
+ expansions_update (file = "src/expansion.yml" ),
1108
+ get_subprocess_exec (args = [".evergreen/scripts/perf-submission.sh" ]),
1109
+ ]
1110
+ return "send dashboard data" , cmds
1108
1111
1109
1112
1110
1113
mod = sys .modules [__name__ ]
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # We use the requester expansion to determine whether the data is from a mainline evergreen run or not
3
+
4
+ set -eu
5
+
6
+ # shellcheck disable=SC2154
7
+ if [ " ${requester} " == " commit" ]; then
8
+ echo " is_mainline: true" >> expansion.yml
9
+ else
10
+ echo " is_mainline: false" >> expansion.yml
11
+ fi
12
+
13
+ # We parse the username out of the order_id as patches append that in and SPS does not need that information
14
+ # shellcheck disable=SC2154
15
+ echo " parsed_order_id: $( echo " ${revision_order_id} " | awk -F' _' ' {print $NF}' ) " >> expansion.yml
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # We use the requester expansion to determine whether the data is from a mainline evergreen run or not
3
+
4
+ set -eu
5
+
6
+ # Submit the performance data to the SPS endpoint
7
+ # shellcheck disable=SC2154
8
+ response=$( curl -s -w " \nHTTP_STATUS:%{http_code}" -X ' POST' \
9
+ " https://performance-monitoring-api.corp.mongodb.com/raw_perf_results/cedar_report?project=${project_id} &version=${version_id} &variant=${build_variant} &order=${parsed_order_id} &task_name=${task_name} &task_id=${task_id} &execution=${execution} &mainline=${is_mainline} " \
10
+ -H ' accept: application/json' \
11
+ -H ' Content-Type: application/json' \
12
+ -d @performance_results.json)
13
+
14
+ http_status=$( echo " $response " | grep " HTTP_STATUS" | awk -F' :' ' {print $2}' )
15
+ response_body=$( echo " $response " | sed ' /HTTP_STATUS/d' )
16
+
17
+ # We want to throw an error if the data was not successfully submitted
18
+ if [ " $http_status " -ne 200 ]; then
19
+ echo " Error: Received HTTP status $http_status "
20
+ echo " Response Body: $response_body "
21
+ exit 1
22
+ fi
23
+
24
+ echo " Response Body: $response_body "
25
+ echo " HTTP Status: $http_status "
You can’t perform that action at this time.
0 commit comments