File tree Expand file tree Collapse file tree 8 files changed +683
-410
lines changed Expand file tree Collapse file tree 8 files changed +683
-410
lines changed Original file line number Diff line number Diff line change @@ -268,8 +268,11 @@ functions:
268268 type : test
269269 params :
270270 binary : bash
271+ add_expansions_to_env : true
271272 env :
272273 VERSION_ID : ${version_id}
274+ BASE_SHA : " ${revision}"
275+ HEAD_SHA : " ${github_commit}"
273276 include_expansions_in_env : [PERF_URI_PRIVATE_ENDPOINT]
274277 args : [*task-runner, perf-pr-comment]
275278
@@ -669,6 +672,7 @@ tasks:
669672 params :
670673 binary : bash
671674 args : [*task-runner, driver-benchmark]
675+ - func : assume-test-secrets-ec2-role
672676 - func : send-perf-data
673677 - func : send-perf-pr-comment
674678
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ go.work.sum
2525.task
2626env.sh
2727expansion.yml
28+ bin
2829
2930# AWS SAM-generated files
3031internal /cmd /faas /awslambda /.aws-sam
@@ -38,6 +39,10 @@ internal/cmd/compilecheck/compilecheck.so
3839api-report.md
3940api-report.txt
4041
42+ # Ignore perf report files
43+ perf-report.md
44+ perf-report.txt
45+
4146# Ignore secrets files
4247secrets-expansion.yml
4348secrets-export.sh
Original file line number Diff line number Diff line change 55set -eux
66
77pushd ./internal/cmd/perfcomp > /dev/null || exist
8- GOWORK=off go run main.go --project= " mongo-go-driver " ${VERSION_ID}
8+ GOWORK=off go build -o ../../../bin/perfcomp .
99popd > /dev/null
10+
11+ # Generate perf report.
12+ GOWORK=off ./bin/perfcomp compare --project=" mongo-go-driver" ${VERSION_ID} > ./internal/cmd/perfcomp/perf-report.txt
13+
14+ if [[ -n " ${BASE_SHA+set} " && -n " ${HEAD_SHA+set} " && " $BASE_SHA " != " $HEAD_SHA " ]]; then
15+ # Parse and generate perf comparison comment.
16+ GOWORK=off ./bin/perfcomp mdreport
17+ # Make the PR comment.
18+ target=$DRIVERS_TOOLS /.evergreen/github_app/create_or_modify_comment.sh
19+ bash $target -m " ## 🧪 Performance Results" -c " $( pwd) /perf-report.md" -h $HEAD_SHA -o " mongodb" -n " mongo-go-driver"
20+ rm ./perf-report.md
21+ else
22+ # Skip comment if it isn't a PR run.
23+ echo " Skipping Perf PR comment"
24+ fi
25+
26+ rm ./internal/cmd/perfcomp/perf-report.txt
You can’t perform that action at this time.
0 commit comments