Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3e53ebf

Browse files
replace perf.send (#2931)
1 parent 2ab53dd commit 3e53ebf

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

‎.evergreen/config.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,38 @@ functions:
377377
script: |
378378
${PREPARE_SHELL}
379379
TEST_CMD="bundle exec rake driver_bench" PERFORMANCE_RESULTS_FILE="$PROJECT_DIRECTORY/perf.json" .evergreen/run-tests.sh
380-
- command: perf.send
380+
- command: shell.exec
381381
params:
382-
file: "${PROJECT_DIRECTORY}/perf.json"
382+
script: |
383+
# We use the requester expansion to determine whether the data is from a mainline evergreen run or not
384+
if [ "${requester}" == "commit" ]; then
385+
is_mainline=true
386+
else
387+
is_mainline=false
388+
fi
389+
390+
# We parse the username out of the order_id as patches append that in and SPS does not need that information
391+
parsed_order_id=$(echo "${revision_order_id}" | awk -F'_' '{print $NF}')
392+
393+
# Submit the performance data to the SPS endpoint
394+
response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X 'POST' \
395+
"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" \
396+
-H 'accept: application/json' \
397+
-H 'Content-Type: application/json' \
398+
-d @${PROJECT_DIRECTORY}/perf.json)
399+
400+
http_status=$(echo "$response" | grep "HTTP_STATUS" | awk -F':' '{print 2ドル}')
401+
response_body=$(echo "$response" | sed '/HTTP_STATUS/d')
402+
403+
# We want to throw an error if the data was not successfully submitted
404+
if [ "$http_status" -ne 200 ]; then
405+
echo "Error: Received HTTP status $http_status"
406+
echo "Response Body: $response_body"
407+
exit 1
408+
fi
409+
410+
echo "Response Body: $response_body"
411+
echo "HTTP Status: $http_status"
383412
384413
"run tests":
385414
- command: shell.exec

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /