Skip to content

Commit d0c72fc

Browse files
Merge v2.0 into v2.x (#1684)
2 parents 695e216 + fe91494 commit d0c72fc

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

.evergreen/config/test-tasks.yml

+31-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,35 @@ tasks:
3636
TOPOLOGY: "server"
3737
MONGODB_VERSION: "v6.0-perf"
3838
- func: "run benchmark"
39-
- command: perf.send
39+
- command: shell.exec
4040
params:
41-
file: src/benchmark/.phpbench/results.json
41+
script: |
42+
# We use the requester expansion to determine whether the data is from a mainline evergreen run or not
43+
if [ "${requester}" == "commit" ]; then
44+
is_mainline=true
45+
else
46+
is_mainline=false
47+
fi
48+
49+
# We parse the username out of the order_id as patches append that in and SPS does not need that information
50+
parsed_order_id=$(echo "${revision_order_id}" | awk -F'_' '{print $NF}')
51+
52+
# Submit the performance data to the SPS endpoint
53+
response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X 'POST' \
54+
"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" \
55+
-H 'accept: application/json' \
56+
-H 'Content-Type: application/json' \
57+
-d @src/benchmark/.phpbench/results.json)
58+
59+
http_status=$(echo "$response" | grep "HTTP_STATUS" | awk -F':' '{print $2}')
60+
response_body=$(echo "$response" | sed '/HTTP_STATUS/d')
61+
62+
# We want to throw an error if the data was not successfully submitted
63+
if [ "$http_status" -ne 200 ]; then
64+
echo "Error: Received HTTP status $http_status"
65+
echo "Response Body: $response_body"
66+
exit 1
67+
fi
68+
69+
echo "Response Body: $response_body"
70+
echo "HTTP Status: $http_status"

0 commit comments

Comments
 (0)