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:
268
268
type : test
269
269
params :
270
270
binary : bash
271
+ add_expansions_to_env : true
271
272
env :
272
273
VERSION_ID : ${version_id}
274
+ BASE_SHA : " ${revision}"
275
+ HEAD_SHA : " ${github_commit}"
273
276
include_expansions_in_env : [PERF_URI_PRIVATE_ENDPOINT]
274
277
args : [*task-runner, perf-pr-comment]
275
278
@@ -669,6 +672,7 @@ tasks:
669
672
params :
670
673
binary : bash
671
674
args : [*task-runner, driver-benchmark]
675
+ - func : assume-test-secrets-ec2-role
672
676
- func : send-perf-data
673
677
- func : send-perf-pr-comment
674
678
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ go.work.sum
25
25
.task
26
26
env.sh
27
27
expansion.yml
28
+ bin
28
29
29
30
# AWS SAM-generated files
30
31
internal /cmd /faas /awslambda /.aws-sam
@@ -38,6 +39,10 @@ internal/cmd/compilecheck/compilecheck.so
38
39
api-report.md
39
40
api-report.txt
40
41
42
+ # Ignore perf report files
43
+ perf-report.md
44
+ perf-report.txt
45
+
41
46
# Ignore secrets files
42
47
secrets-expansion.yml
43
48
secrets-export.sh
Original file line number Diff line number Diff line change 5
5
set -eux
6
6
7
7
pushd ./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 .
9
9
popd > /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