]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/perf: use 'test_file_size' in more places
authorTaylor Blau <me@ttaylorr.com>
Thu, 21 Nov 2024 20:29:24 +0000 (15:29 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Nov 2024 00:44:34 +0000 (09:44 +0900)
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>
t/perf/p5311-pack-bitmaps-fetch.sh
t/perf/p5332-multi-pack-reuse.sh

index 426fab87e3293e0d1817159eacd1f63e6cd27fd7..047efb995d647b58edbc2e5326840f09dc99742f 100755 (executable)
@@ -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)" '
index 5c6c575d62c64b178118bd5993df3ec9de5d1956..d1c89a8b7dbd5bdaad3462f1195409d9fb21fff1 100755 (executable)
@@ -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