File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -783,9 +783,34 @@ functions:
783783 PROJECT_DIRECTORY=${PROJECT_DIRECTORY} .evergreen/run-perf-tests.sh
784784
785785 " send dashboard data " :
786- - command : perf.send
786+ - command : shell.exec
787787 params :
788- file : src/results.json
788+ script : |
789+ if [ "${requester}" == "commit" ]; then
790+ is_mainline=true
791+ else
792+ is_mainline=false
793+ fi
794+
795+ parsed_order_id=$(echo "${revision_order_id}" | awk -F'_' '{print $NF}')
796+ response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X 'POST' \
797+ "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" \
798+ -H 'accept: application/json' \
799+ -H 'Content-Type: application/json' \
800+ -d @src/results.json)
801+
802+ http_status=$(echo "$response" | grep "HTTP_STATUS" | awk -F':' '{print $2}')
803+ response_body=$(echo "$response" | sed '/HTTP_STATUS/d')
804+
805+ # We want to throw an error if the data was not successfully submitted
806+ if [ "$http_status" -ne 200 ]; then
807+ echo "Error: Received HTTP status $http_status"
808+ echo "Response Body: $response_body"
809+ exit 1
810+ fi
811+
812+ echo "Response Body: $response_body"
813+ echo "HTTP Status: $http_status"
789814
790815 " run graalvm native image app " :
791816 - command : shell.exec
You can’t perform that action at this time.
0 commit comments