diff options
Diffstat (limited to 't/perf')
| -rwxr-xr-x | t/perf/p1500-graph-walks.sh | 31 | ||||
| -rwxr-xr-x | t/perf/p5311-pack-bitmaps-fetch.sh | 2 | ||||
| -rwxr-xr-x | t/perf/p5332-multi-pack-reuse.sh | 2 | ||||
| -rwxr-xr-x | t/perf/p6100-describe.sh | 30 | ||||
| -rwxr-xr-x | t/perf/p7527-builtin-fsmonitor.sh | 2 | ||||
| -rw-r--r-- | t/perf/perf-lib.sh | 4 |
6 files changed, 66 insertions, 5 deletions
diff --git a/t/perf/p1500-graph-walks.sh b/t/perf/p1500-graph-walks.sh index e14e7620cc..5b23ce5db9 100755 --- a/t/perf/p1500-graph-walks.sh +++ b/t/perf/p1500-graph-walks.sh @@ -20,6 +20,21 @@ test_expect_success 'setup' ' echo tag-$ref || return 1 done >tags && + + echo "A:HEAD" >test-tool-refs && + for line in $(cat refs) + do + echo "X:$line" >>test-tool-refs || return 1 + done && + echo "A:HEAD" >test-tool-tags && + for line in $(cat tags) + do + echo "X:$line" >>test-tool-tags || return 1 + done && + + commit=$(git commit-tree $(git rev-parse HEAD^{tree})) && + git update-ref refs/heads/disjoint-base $commit && + git commit-graph write --reachable ' @@ -47,4 +62,20 @@ test_perf 'contains: git tag --merged' ' xargs git tag --merged=HEAD <tags ' +test_perf 'is-base check: test-tool reach (refs)' ' + test-tool reach get_branch_base_for_tip <test-tool-refs +' + +test_perf 'is-base check: test-tool reach (tags)' ' + test-tool reach get_branch_base_for_tip <test-tool-tags +' + +test_perf 'is-base check: git for-each-ref' ' + git for-each-ref --format="%(is-base:HEAD)" --stdin <refs +' + +test_perf 'is-base check: git for-each-ref (disjoint-base)' ' + git for-each-ref --format="%(is-base:refs/heads/disjoint-base)" --stdin <refs +' + test_done diff --git a/t/perf/p5311-pack-bitmaps-fetch.sh b/t/perf/p5311-pack-bitmaps-fetch.sh index 426fab87e3..047efb995d 100755 --- a/t/perf/p5311-pack-bitmaps-fetch.sh +++ b/t/perf/p5311-pack-bitmaps-fetch.sh @@ -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)" ' diff --git a/t/perf/p5332-multi-pack-reuse.sh b/t/perf/p5332-multi-pack-reuse.sh index 5c6c575d62..d1c89a8b7d 100755 --- a/t/perf/p5332-multi-pack-reuse.sh +++ b/t/perf/p5332-multi-pack-reuse.sh @@ -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 diff --git a/t/perf/p6100-describe.sh b/t/perf/p6100-describe.sh new file mode 100755 index 0000000000..069f91ce49 --- /dev/null +++ b/t/perf/p6100-describe.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +test_description='performance of git-describe' +. ./perf-lib.sh + +test_perf_default_repo + +# clear out old tags and give us a known state +test_expect_success 'set up tags' ' + git for-each-ref --format="delete %(refname)" refs/tags >to-delete && + git update-ref --stdin <to-delete && + new=$(git rev-list -1000 HEAD | tail -n 1) && + git tag -m new new $new && + old=$(git rev-list HEAD | tail -n 1) && + git tag -m old old $old +' + +test_perf 'describe HEAD' ' + git describe HEAD +' + +test_perf 'describe HEAD with one max candidate' ' + git describe --candidates=1 HEAD +' + +test_perf 'describe HEAD with one tag' ' + git describe --match=new HEAD +' + +test_done diff --git a/t/perf/p7527-builtin-fsmonitor.sh b/t/perf/p7527-builtin-fsmonitor.sh index c3f9a4caa4..90164327e8 100755 --- a/t/perf/p7527-builtin-fsmonitor.sh +++ b/t/perf/p7527-builtin-fsmonitor.sh @@ -95,7 +95,7 @@ test_expect_success "Setup borrowed repo (fsm+uc)" " # time is not useful. # # Create a temp branch and do all work relative to it so that we don't -# accidentially alter the real ballast branch. +# accidentally alter the real ballast branch. # test_expect_success "Setup borrowed repo (temp ballast branch)" " test_might_fail git -C $REPO checkout $BALLAST_BR && diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh index ab0c763411..8ab6d9c469 100644 --- a/t/perf/perf-lib.sh +++ b/t/perf/perf-lib.sh @@ -282,7 +282,7 @@ test_perf_ () { # Run the performance test script specified in perf-test with # optional prerequisite and setup steps. # Options: -# --prereq prerequisites: Skip the test if prequisites aren't met +# --prereq prerequisites: Skip the test if prerequisites aren't met # --setup "setup-steps": Run setup steps prior to each measured iteration # test_perf () { @@ -309,7 +309,7 @@ test_size_ () { # prerequisites and setup steps. Returns the numeric value # returned by size-test. # Options: -# --prereq prerequisites: Skip the test if prequisites aren't met +# --prereq prerequisites: Skip the test if prerequisites aren't met # --setup "setup-steps": Run setup steps prior to the size measurement test_size () { |
