diff options
author | Jeff King <peff@peff.net> | 2020-08-21 13:54:51 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-21 12:02:36 -0700 |
commit | 218389b9f3d1b5c8583cc0e944692f7c66af8a03 (patch) | |
tree | bd24f0b08c81d3a9a7c517c89c5b8200ebc2540d /t/t7416-submodule-dash-url.sh | |
parent | p5302: disable thread-count parameter tests by default (diff) | |
download | tgif-218389b9f3d1b5c8583cc0e944692f7c66af8a03.tar.xz |
p5302: count up to online-cpus for thread tests
When PERF_EXTRA is enabled, p5302 checks the performance of index-pack
with various numbers of threads. This can be useful for deciding what
the default should be (which is currently capped at 3 threads based on
the results of this script).
However, we only go up to 8 threads, and modern machines may have more.
Let's get the number of CPUs from test-tool, and test various numbers of
threads between one and that maximum.
Note that the current tests aren't all identical, as we have to set
GIT_FORCE_THREADS for the --threads=1 test (which measures the overhead
of starting a single worker thread versus the "0" case of using the main
thread). To keep the loop simple, we'll keep the "0" case out of it, and
set GIT_FORCE_THREADS=1 for all of the other cases (it's a noop for all
but the "1" case, since numbers higher than 1 would always need
threads).
Note also that we could skip running "test-tool" if PERF_EXTRA isn't
set. However, there's some small value in knowing the number of threads,
so that we can mark each test as skipped in the output.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7416-submodule-dash-url.sh')
0 files changed, 0 insertions, 0 deletions