Skip to content

fix(ci): replace perf.send command with new API end point for performance data submission DEVPROD-19866 #2510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4402,9 +4402,38 @@ functions:
sh -c 'MONGOSH_SMOKE_TEST_SERVER="$MONGODB_URI" ./dist/mongosh --perfTests > perf_results.json'
env:
DISTRO_ID: ${distro_id}
- command: perf.send
- command: shell.exec
params:
file: src/perf_results.json
script: |
# We use the requester expansion to determine whether the data is from a mainline evergreen run or not
if [ "${requester}" == "commit" ]; then
is_mainline=true
else
is_mainline=false
fi

# Parse the username out of the order_id. Patches append the username. The Signal Processing Service (SPS) endpoint does not need the other information.
parsed_order_id=$(echo "${revision_order_id}" | awk -F'_' '{print $NF}')

# Submit the performance data to the SPS endpoint
response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X 'POST' \
"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" \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d @src/perf_results.json)

http_status=$(echo "$response" | grep "HTTP_STATUS" | awk -F':' '{print $2}')
response_body=$(echo "$response" | sed '/HTTP_STATUS/d')

# We want to throw an error if the data was not successfully submitted
if [ "$http_status" -ne 200 ]; then
echo "Error: Received HTTP status $http_status"
echo "Response Body: $response_body"
exit 1
fi

echo "Response Body: $response_body"
echo "HTTP Status: $http_status"

# Tasks will show up as the individual blocks in the Evergreen UI that can
# pass or fail.
Expand Down
33 changes: 31 additions & 2 deletions .evergreen/evergreen.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -1047,10 +1047,39 @@ functions:
sh -c 'MONGOSH_SMOKE_TEST_SERVER="$MONGODB_URI" ./dist/mongosh --perfTests > perf_results.json'
env:
DISTRO_ID: ${distro_id}
- command: perf.send
- command: shell.exec
params:
file: src/perf_results.json
script: |
# We use the requester expansion to determine whether the data is from a mainline evergreen run or not
if [ "${requester}" == "commit" ]; then
is_mainline=true
else
is_mainline=false
fi

# Parse the username out of the order_id. Patches append the username. The Signal Processing Service (SPS) endpoint does not need the other information.
parsed_order_id=$(echo "${revision_order_id}" | awk -F'_' '{print $NF}')

# Submit the performance data to the SPS endpoint
response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X 'POST' \
"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" \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d @src/perf_results.json)

http_status=$(echo "$response" | grep "HTTP_STATUS" | awk -F':' '{print $2}')
response_body=$(echo "$response" | sed '/HTTP_STATUS/d')

# We want to throw an error if the data was not successfully submitted
if [ "$http_status" -ne 200 ]; then
echo "Error: Received HTTP status $http_status"
echo "Response Body: $response_body"
exit 1
fi

echo "Response Body: $response_body"
echo "HTTP Status: $http_status"

# Tasks will show up as the individual blocks in the Evergreen UI that can
# pass or fail.
#
Expand Down
Loading