Skip to content

Commit 457a294

Browse files
authored
Migrate perf.send to cedar_report endpoint (#1679)
JAVA-5864 DEVPROD-16438
1 parent 9311359 commit 457a294

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.evergreen/.evg.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy