Skip to content

Commit e280923

Browse files
vdyegitster
authored andcommitted
t/perf: add Scalar performance tests
Create 'p9210-scalar.sh' for testing Scalar performance and comparing performance of Git operations in Scalar registrations and standard repositories. Example results: Test this tree ------------------------------------------------------------------------ 9210.2: scalar clone 14.82(18.00+3.63) 9210.3: git clone 26.15(36.67+6.90) 9210.4: git status (scalar) 0.04(0.01+0.01) 9210.5: git status (non-scalar) 0.10(0.02+0.11) 9210.6: test_commit --append --no-tag A (scalar) 0.08(0.02+0.03) 9210.7: test_commit --append --no-tag A (non-scalar) 0.13(0.03+0.11) Helped-by: Johannes Schindelin <[email protected]> Signed-off-by: Victoria Dye <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 14b4e7e commit e280923

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

t/perf/p9210-scalar.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/sh
2+
3+
test_description='test scalar performance'
4+
. ./perf-lib.sh
5+
6+
test_perf_large_repo "$TRASH_DIRECTORY/to-clone"
7+
8+
test_expect_success 'enable server-side partial clone' '
9+
git -C to-clone config uploadpack.allowFilter true &&
10+
git -C to-clone config uploadpack.allowAnySHA1InWant true
11+
'
12+
13+
test_perf 'scalar clone' '
14+
rm -rf scalar-clone &&
15+
scalar clone "file://$(pwd)/to-clone" scalar-clone
16+
'
17+
18+
test_perf 'git clone' '
19+
rm -rf git-clone &&
20+
git clone "file://$(pwd)/to-clone" git-clone
21+
'
22+
23+
test_compare_perf () {
24+
command=$1
25+
shift
26+
args=$*
27+
test_perf "$command $args (scalar)" "
28+
$command -C scalar-clone/src $args
29+
"
30+
31+
test_perf "$command $args (non-scalar)" "
32+
$command -C git-clone $args
33+
"
34+
}
35+
36+
test_compare_perf git status
37+
test_compare_perf test_commit --append --no-tag A
38+
39+
test_done

0 commit comments

Comments
 (0)