[PATCH 12/27] [GSOC] cat-file: create p1006-cat-file.sh
- From
ZheNing Hu via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Aug 13, 2021, 08:22 UTC
- Message-ID
- <1f72eb6e4e0f0e5eaeef2b45deebc81f2b611357.1628842990.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.1016.git.1628842990.gitgitgadget@gmail.com>
From: ZheNing Hu <adlternative@gmail.com>
Create p1006-cat-file.sh to provide performance testing for `git cat-file --batch` and `git cat-file --batch-check`. This will help us compare the performance changes after we let cat-file reuse the ref-filter logic.
Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Mentored-by: Christian Couder <christian.couder@gmail.com> Mentored-by: Hariom Verma <hariom18599@gmail.com> Signed-off-by: ZheNing Hu <adlternative@gmail.com> --- t/perf/p1006-cat-file.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 t/perf/p1006-cat-file.sh
diff --git a/t/perf/p1006-cat-file.sh b/t/perf/p1006-cat-file.sh new file mode 100755 index 00000000000..b84ac31f9cc --- /dev/null +++ b/t/perf/p1006-cat-file.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +test_description='Basic sort performance tests' +. ./perf-lib.sh + +test_perf_default_repo + +test_expect_success 'setup' ' + git rev-list --all >rla +' + +test_perf 'cat-file --batch-check' ' + git cat-file --batch-check <rla +' + +test_perf 'cat-file --batch-check with atoms' ' + git cat-file --batch-check="%(objectname) %(objecttype)" <rla +' + +test_perf 'cat-file --batch' ' + git cat-file --batch <rla +' + +test_perf 'cat-file --batch with atoms' ' + git cat-file --batch="%(objectname) %(objecttype)" <rla +' + +test_done
-- gitgitgadget