interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / t / perf / p9210-scalar.sh

40 lines · 839 bytes Raw Blame History
1#!/bin/sh
2
3test_description='test scalar performance'
4. ./perf-lib.sh
5
6test_perf_large_repo "$TRASH_DIRECTORY/to-clone"
7
8test_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 git -C to-clone checkout -B test-branch
12'
13
14test_perf 'scalar clone' '
15 rm -rf scalar-clone &&
16 scalar clone "file://$(pwd)/to-clone" scalar-clone
17'
18
19test_perf 'git clone' '
20 rm -rf git-clone &&
21 git clone "file://$(pwd)/to-clone" git-clone
22'
23
24test_compare_perf () {
25 command=$1
26 shift
27 args=$*
28 test_perf "$command $args (scalar)" "
29 $command -C scalar-clone/src $args
30 "
31
32 test_perf "$command $args (non-scalar)" "
33 $command -C git-clone $args
34 "
35}
36
37test_compare_perf git status
38test_compare_perf test_commit --append --no-tag A
39
40test_done