Skip to content

Commit

Permalink
t/perf: use 'test_file_size' in more places
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
ttaylorr authored and gitster committed Nov 22, 2024
1 parent 46698a8 commit 3f97f1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion t/perf/p5311-pack-bitmaps-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)" '
Expand Down
2 changes: 1 addition & 1 deletion t/perf/p5332-multi-pack-reuse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3f97f1b

Please sign in to comment.