Skip to content
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
4 changes: 4 additions & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,11 @@ functions:
type: test
params:
binary: bash
add_expansions_to_env: true
env:
VERSION_ID: ${version_id}
BASE_SHA: "${revision}"
HEAD_SHA: "${github_commit}"
include_expansions_in_env: [PERF_URI_PRIVATE_ENDPOINT]
args: [*task-runner, perf-pr-comment]

Expand Down Expand Up @@ -669,6 +672,7 @@ tasks:
params:
binary: bash
args: [*task-runner, driver-benchmark]
- func: assume-test-secrets-ec2-role
- func: send-perf-data
- func: send-perf-pr-comment

Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ go.work.sum
.task
env.sh
expansion.yml
bin

# AWS SAM-generated files
internal/cmd/faas/awslambda/.aws-sam
Expand All @@ -38,6 +39,10 @@ internal/cmd/compilecheck/compilecheck.so
api-report.md
api-report.txt

# Ignore perf report files
perf-report.md
perf-report.txt

# Ignore secrets files
secrets-expansion.yml
secrets-export.sh
Expand Down
19 changes: 18 additions & 1 deletion etc/perf-pr-comment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,22 @@
set -eux

pushd ./internal/cmd/perfcomp >/dev/null || exist
GOWORK=off go run main.go --project="mongo-go-driver" ${VERSION_ID}
GOWORK=off go build -o ../../../bin/perfcomp .
popd >/dev/null

# Generate perf report.
GOWORK=off ./bin/perfcomp compare --project="mongo-go-driver" ${VERSION_ID} > ./internal/cmd/perfcomp/perf-report.txt

if [[ -n "${BASE_SHA+set}" && -n "${HEAD_SHA+set}" && "$BASE_SHA" != "$HEAD_SHA" ]]; then
# Parse and generate perf comparison comment.
GOWORK=off ./bin/perfcomp mdreport
# Make the PR comment.
target=$DRIVERS_TOOLS/.evergreen/github_app/create_or_modify_comment.sh
bash $target -m "## 🧪 Performance Results" -c "$(pwd)/perf-report.md" -h $HEAD_SHA -o "mongodb" -n "mongo-go-driver"
rm ./perf-report.md
else
# Skip comment if it isn't a PR run.
echo "Skipping Perf PR comment"
fi

rm ./internal/cmd/perfcomp/perf-report.txt
Loading
Loading