Skip to content

Commit 4ddc3d5

Browse files
pks-tgitster
authored andcommitted
meson: wire up benchmarking options
Wire up a couple of benchmarking options that we end up writing into our "GIT-BUILD-OPTIONS" file. These options allow users to control how exactly benchmarks are executed. Note that neither `GIT_PERF_MAKE_COMMAND` nor `GIT_PERF_MAKE_OPTS` are exposed as a build option. Those options are used by "t/perf/run", which is not used by Meson. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1ee894a commit 4ddc3d5

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

meson.build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -666,11 +666,11 @@ builtin_sources += custom_target(
666666
# build options to our tests.
667667
build_options_config = configuration_data()
668668
build_options_config.set('GIT_INTEROP_MAKE_OPTS', '')
669-
build_options_config.set('GIT_PERF_LARGE_REPO', '')
669+
build_options_config.set_quoted('GIT_PERF_LARGE_REPO', get_option('benchmark_large_repo'))
670670
build_options_config.set('GIT_PERF_MAKE_COMMAND', '')
671671
build_options_config.set('GIT_PERF_MAKE_OPTS', '')
672-
build_options_config.set('GIT_PERF_REPEAT_COUNT', '')
673-
build_options_config.set('GIT_PERF_REPO', '')
672+
build_options_config.set_quoted('GIT_PERF_REPEAT_COUNT', get_option('benchmark_repeat_count').to_string())
673+
build_options_config.set_quoted('GIT_PERF_REPO', get_option('benchmark_repo'))
674674
build_options_config.set('GIT_TEST_CMP_USE_COPIED_CONTEXT', '')
675675
build_options_config.set('GIT_TEST_INDEX_VERSION', '')
676676
build_options_config.set('GIT_TEST_OPTS', '')

meson_options.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ option('docs_backend', type: 'combo', choices: ['asciidoc', 'asciidoctor', 'auto
101101
description: 'Which backend to use to generate documentation.')
102102

103103
# Testing.
104+
option('benchmark_repo', type: 'string', value: '',
105+
description: 'Repository to copy for the performance tests. Should be at least the size of the Git repository.')
106+
option('benchmark_large_repo', type: 'string', value: '',
107+
description: 'Large repository to copy for the performance tests. Should be at least the size of the Linux repository.')
108+
option('benchmark_repeat_count', type: 'integer', value: 3,
109+
description: 'Number of times a test should be repeated for best-of-N measurements.')
104110
option('coccinelle', type: 'feature', value: 'auto',
105111
description: 'Provide a coccicheck target that generates a Coccinelle patch.')
106112
option('tests', type: 'boolean', value: true,

0 commit comments

Comments
 (0)