From aa338d35087fdfc268d6f386a40464056acc6237 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 20 Nov 2017 15:26:43 -0500 Subject: [PATCH] p5550: factor out nonsense-pack creation We have a function to create a bunch of irrelevant packs to measure the expense of reprepare_packed_git(). Let's make that available to other perf scripts. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/perf/lib-pack.sh | 29 +++++++++++++++++++++++++++++ t/perf/p5550-fetch-tags.sh | 25 ++----------------------- 2 files changed, 31 insertions(+), 23 deletions(-) create mode 100644 t/perf/lib-pack.sh diff --git a/t/perf/lib-pack.sh b/t/perf/lib-pack.sh new file mode 100644 index 0000000000..501bb7b272 --- /dev/null +++ b/t/perf/lib-pack.sh @@ -0,0 +1,29 @@ +# Helpers for dealing with large numbers of packs. + +# create $1 nonsense packs, each with a single blob +create_packs () { + perl -le ' + my ($n) = @ARGV; + for (1..$n) { + print "blob"; + print "data <