aboutsummaryrefslogtreecommitdiffstats
path: root/t/perf
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2024-11-21 15:29:24 -0500
committerJunio C Hamano <gitster@pobox.com>2024-11-22 09:44:34 +0900
commit3f97f1bce6aeb9ee2b642f51cb62f610dc3a4ae0 (patch)
tree3f4d509f549b4d4c7ab92939b23c890d8bace4d1 /t/perf
parent46698a8ea13f244aac74366d2ee66a88e92e001a (diff)
downloadgit-3f97f1bce6aeb9ee2b642f51cb62f610dc3a4ae0.tar.gz
t/perf: use 'test_file_size' in more places
The perf test suite prefers to use test_file_size over 'wc -c' when inside of a test_size block. One advantage is that accidentally writign "wc -c file" (instead of "wc -c <file") does not inadvertently break the tests (since the former will include the filename in the output of wc). Both of the two uses of test_size use "wc -c", but let's convert those to the more conventional test_file_size helper instead. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/perf')
-rwxr-xr-xt/perf/p5311-pack-bitmaps-fetch.sh2
-rwxr-xr-xt/perf/p5332-multi-pack-reuse.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/t/perf/p5311-pack-bitmaps-fetch.sh b/t/perf/p5311-pack-bitmaps-fetch.sh
index 426fab87e3..047efb995d 100755
--- a/t/perf/p5311-pack-bitmaps-fetch.sh
+++ b/t/perf/p5311-pack-bitmaps-fetch.sh
@@ -39,7 +39,7 @@ test_fetch_bitmaps () {
'
test_size "size $title" '
- wc -c <tmp.pack
+ test_file_size tmp.pack
'
test_perf "client $title (lookup=$1)" '
diff --git a/t/perf/p5332-multi-pack-reuse.sh b/t/perf/p5332-multi-pack-reuse.sh
index 5c6c575d62..d1c89a8b7d 100755
--- a/t/perf/p5332-multi-pack-reuse.sh
+++ b/t/perf/p5332-multi-pack-reuse.sh
@@ -73,7 +73,7 @@ do
"
test_size "clone size for $nr_packs-pack scenario ($reuse-pack reuse)" '
- wc -c <result
+ test_file_size result
'
done
done