Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2023-06-07 07:39:07 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2023-06-07 16:44:39 +0300
commita2ee3d116bab51f4ad9e4a7a0dbffe306f6d5791 (patch)
tree1d8c4d98fcbefbb73c18260aece914eb5bef013f /.gitlab-ci.yml
parent935a3a8bb0c00a82071dad3dc25f46965b42447a (diff)
Makefile: Make generation of coverage info optional
Starting with 77c67bb94 (Generate coverage report from all test runs, 2023-05-21), we generate coverage information by default. The runtime overhead of recording the data is comparatively negligible with a 3% slowdown. But interestingly, it does take quite a while to generate the resulting Coverage report. Fix this by making generation of coverage info optional with the newly introduced `TEST_WITH_COVERAGE` variable. This allows us to only compute the data as needed and provides a very noticable speedup: Benchmark 1: make test-go Time (mean ± σ): 69.015 s ± 1.001 s [User: 521.524 s, System: 171.512 s] Range (min … max): 67.865 s … 69.690 s 3 runs Benchmark 2: make test-go TEST_WITH_COVERAGE=YesPlease Time (mean ± σ): 120.624 s ± 1.185 s [User: 673.246 s, System: 207.668 s] Range (min … max): 119.470 s … 121.838 s 3 runs Summary 'make test-go' ran 1.75 ± 0.03 times faster than 'make test-go TEST_WITH_COVERAGE=YesPlease' As we do indeed want to have coverage information available in our CI systems the variable is set in our test jobs by default.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml1
1 files changed, 1 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0db81538d..3bf952991 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -101,6 +101,7 @@ workflow:
TEST_JSON_REPORT: "${CI_PROJECT_DIR}/_build/reports/test-report.json"
TEST_LOG_DIR: "${CI_PROJECT_DIR}/_build/reports/test-logs"
TEST_OPTIONS: "-count=1 -timeout=20m" # a number of tests may exceed the default 10m
+ TEST_WITH_COVERAGE: YesPlease
before_script: &test_before_script
- go version
script: