File tree 1 file changed +31
-2
lines changed 1 file changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -476,10 +476,39 @@ functions:
476
476
script : |
477
477
${PREPARE_SHELL}
478
478
MONGODB_URI="${MONGODB_URI}" ../../evergreen/run-perf-tests.sh
479
- - command : perf.send
479
+ - command : shell.exec
480
480
params :
481
- file : mongo-csharp-driver/benchmarks/MongoDB.Driver.Benchmarks/Benchmark.Artifacts/results/evergreen-results.json
481
+ script : |
482
+ # We use the requester expansion to determine whether the data is from a mainline evergreen run or not
483
+ if [ "${requester}" == "commit" ]; then
484
+ is_mainline=true
485
+ else
486
+ is_mainline=false
487
+ fi
488
+
489
+ # We parse the username out of the order_id as patches append that in and SPS does not need that information
490
+ parsed_order_id=$(echo "${revision_order_id}" | awk -F'_' '{print $NF}')
491
+
492
+ # Submit the performance data to the SPS endpoint
493
+ response=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X 'POST' \
494
+ "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" \
495
+ -H 'accept: application/json' \
496
+ -H 'Content-Type: application/json' \
497
+ -d @mongo-csharp-driver/benchmarks/MongoDB.Driver.Benchmarks/Benchmark.Artifacts/results/evergreen-results.json)
498
+
499
+ http_status=$(echo "$response" | grep "HTTP_STATUS" | awk -F':' '{print $2}')
500
+ response_body=$(echo "$response" | sed '/HTTP_STATUS/d')
501
+
502
+ # We want to throw an error if the data was not successfully submitted
503
+ if [ "$http_status" -ne 200 ]; then
504
+ echo "Error: Received HTTP status $http_status"
505
+ echo "Response Body: $response_body"
506
+ exit 1
507
+ fi
482
508
509
+ echo "Response Body: $response_body"
510
+ echo "HTTP Status: $http_status"
511
+
483
512
assume-ec2-role :
484
513
- command : ec2.assume_role
485
514
params :
You can’t perform that action at this time.
0 commit comments