[Git][ghc/ghc][wip/backports] 2 commits: gitlab-ci: Use MR base commit as performance baseline
Ben Gamari
gitlab at gitlab.haskell.org
Sat Aug 15 16:20:06 UTC 2020
Ben Gamari pushed to branch wip/backports at Glasgow Haskell Compiler / GHC
Commits:
ce32390c by Ben Gamari at 2020-08-15T12:19:32-04:00
gitlab-ci: Use MR base commit as performance baseline
(cherry picked from commit 4b91e5edf64363eff7d087731c2806464033447c)
Metric Decrease:
T13056
T18304
T1969
T9233
- - - - -
1c7ebdcb by Ben Gamari at 2020-08-15T12:19:55-04:00
Accept performance shifts
- - - - -
5 changed files:
- .gitlab-ci.yml
- .gitlab/ci.sh
- hadrian/src/Settings/Builders/RunTest.hs
- libraries/bytestring
- testsuite/mk/test.mk
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -26,12 +26,28 @@ stages:
- testing # head.hackage correctness and compiler performance testing
- deploy # push documentation
+# Note [The CI Story]
+# ~~~~~~~~~~~~~~~~~~~
+#
+# There are two different types of pipelines:
+#
+# - marge-bot merges to `master`. Here we perform an exhaustive validation
+# across all of the platforms which we support. In addition, we push
+# performance metric notes upstream, providing a persistent record of the
+# performance characteristics of the compiler.
+#
+# - merge requests. Here we perform a slightly less exhaustive battery of
+# testing. Namely we omit some configurations (e.g. the unregisterised job).
+# These use the merge request's base commit for performance metric
+# comparisons.
+#
+
workflow:
- # N.B.Don't run on wip/ branches, instead on run on merge requests.
+ # N.B. Don't run on wip/ branches, instead on run on merge requests.
rules:
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_TAG
- - if: '$CI_COMMIT_BRANCH == "master"'
+ - if: '$CI_COMMIT_BRANCH == "wip/marge_bot_batch_merge_job"'
- if: '$CI_COMMIT_BRANCH =~ /ghc-[0.9]+\.[0-9]+/'
- if: '$CI_PIPELINE_SOURCE == "web"'
=====================================
.gitlab/ci.sh
=====================================
@@ -363,6 +363,13 @@ function push_perf_notes() {
"$TOP/.gitlab/test-metrics.sh" push
}
+# Figure out which commit should be used by the testsuite driver as a
+# performance baseline. See Note [The CI Story].
+function determine_metric_baseline() {
+ export PERF_BASELINE_COMMIT="$(git merge-base $CI_MERGE_REQUEST_TARGET_BRANCH_NAME HEAD)"
+ info "Using $PERF_BASELINE_COMMIT for performance metric baseline..."
+}
+
function test_make() {
run "$MAKE" test_bindist TEST_PREP=YES
run "$MAKE" V=0 test \
=====================================
hadrian/src/Settings/Builders/RunTest.hs
=====================================
@@ -78,6 +78,7 @@ runTestBuilderArgs = builder RunTest ? do
<*> (maybe False (=="YES") <$> lookupEnv "OS")
(testEnv, testMetricsFile) <- expr . liftIO $
(,) <$> lookupEnv "TEST_ENV" <*> lookupEnv "METRICS_FILE"
+ perfBaseline <- expr . liftIO $ lookupEnv "PERF_BASELINE_COMMIT"
threads <- shakeThreads <$> expr getShakeOptions
os <- getTestSetting TestHostOS
@@ -141,6 +142,9 @@ runTestBuilderArgs = builder RunTest ? do
, arg "--config", arg $ "timeout_prog=" ++ show (top -/- timeoutProg)
, arg "--config", arg $ "stats_files_dir=" ++ statsFilesDir
, arg $ "--threads=" ++ show threads
+ , case perfBaseline of
+ Just commit | not (null commit) -> arg ("--perf-baseline=" ++ show commit)
+ _ -> mempty
, emitWhenSet testEnv $ \env -> arg ("--test-env=" ++ show env)
, emitWhenSet testMetricsFile $ \file -> arg ("--metrics-file=" ++ file)
, getTestArgs -- User-provided arguments from command line.
=====================================
libraries/bytestring
=====================================
@@ -1 +1 @@
-Subproject commit e6cb01e2ec0bfdd19298418c85f220925a9fa307
+Subproject commit 95fe6bdf13c9cc86c1c880164f7844d61d989574
=====================================
testsuite/mk/test.mk
=====================================
@@ -226,6 +226,10 @@ ifneq "$(VERBOSE)" ""
RUNTEST_OPTS += --verbose=$(VERBOSE)
endif
+ifneq "$(PERF_TEST_BASELINE_COMMIT)" ""
+RUNTEST_OPTS += --perf-baseline=$(PERF_TEST_BASELINE_COMMIT)
+endif
+
ifeq "$(SKIP_PERF_TESTS)" "YES"
RUNTEST_OPTS += --skip-perf-tests
endif
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/682cf7c6e266b7fcadc1e8ddf0b23991a008e39f...1c7ebdcb450750589445932205da91b82207c64a
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/682cf7c6e266b7fcadc1e8ddf0b23991a008e39f...1c7ebdcb450750589445932205da91b82207c64a
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200815/a19f8187/attachment-0001.html>
More information about the ghc-commits
mailing list