mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 16:57:40 +03:00
more flexible perf test check (#5891)
This PR separates the "last known valid perf test" commit from the "baseline speedy implementation" commit. It is important for the perf test to be meaningful that the changes between those two commits are benign, say minor API adjustments, so that the perf measurement remains meaningful. This also adds a check on merging to master that tells Slack if the perf test has changed and the `test_sha` file needs updating. The Slack message is conditional on the current commit to avoid excessive noise. CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
a0635fa397
commit
11a2fc3c2d
@ -260,6 +260,30 @@ jobs:
|
||||
fi
|
||||
name: out
|
||||
|
||||
- job: check_perf_test
|
||||
pool:
|
||||
name: linux-pool
|
||||
condition: eq(variables['Build.Reason'], 'IndividualCI')
|
||||
steps:
|
||||
- bash: |
|
||||
TEST_SHA=$(cat ci/cron/perf/test_sha)
|
||||
LAST_CHANGES=$(git log -n1 --format=%H daml-lf/scenario-interpreter/src/perf)
|
||||
CURRENT_SHA=$(git rev-parse HEAD)
|
||||
if [ "$TEST_SHA" != "$LAST_CHANGES" ]; then
|
||||
if [ "$LAST_CHANGES" = "$CURRENT_SHA" ]; then
|
||||
curl -XPOST \
|
||||
-i \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data "{\"text\":\"<!here> Perf tests seem to have changed. Please manually check:\n\`\`\`\ngit diff $TEST_SHA $LAST_CHANGES -- daml-lf/scenario-interpreter/src/perf\n\`\`\`\nand update accordingly. If the change is benign, update \`ci/cron/perf/test_sha\` to \`$LAST_CHANGES\`. With no intervention, you will no longer get performance reports.\"}" \
|
||||
$(Slack.team-daml)
|
||||
else
|
||||
echo "Changes detected, but not from this commit."
|
||||
fi
|
||||
else
|
||||
echo "No change detected."
|
||||
fi
|
||||
displayName: check perf changes
|
||||
|
||||
- job: release
|
||||
dependsOn: [ "check_for_release", "Linux", "macOS", "Windows" ]
|
||||
condition: and(succeeded(),
|
||||
|
@ -98,10 +98,11 @@ jobs:
|
||||
set -euo pipefail
|
||||
eval "$(dev-env/bin/dade assist)"
|
||||
BASELINE="cebc26af88efef4a7c81c62b0c14353f829b755e"
|
||||
TEST_SHA=$(cat ci/cron/perf/test_sha)
|
||||
OUT="$(Build.StagingDirectory)/perf-results.json"
|
||||
if git diff --exit-code $BASELINE -- daml-lf/scenario-interpreter/src/perf >&2; then
|
||||
if git diff --exit-code $TEST_SHA -- daml-lf/scenario-interpreter/src/perf >&2; then
|
||||
# no changes, all good
|
||||
ci/cron/compare-perf.sh $BASELINE > $OUT
|
||||
ci/cron/perf/compare.sh $BASELINE > $OUT
|
||||
else
|
||||
# the tests have changed, we need to figure out what to do with
|
||||
# the baseline.
|
||||
|
1
ci/cron/perf/test_sha
Normal file
1
ci/cron/perf/test_sha
Normal file
@ -0,0 +1 @@
|
||||
53b24793f4a90b777198c7e6dd4e509b4085c140
|
Loading…
Reference in New Issue
Block a user