Merge branch 'tb/midx-write-cleanup'
[alt-git.git] / t / perf / p0001-rev-list.sh
blob3042a85666ce14f1f30777ddbeb3e87c7a9bb7ce
1 #!/bin/sh
3 test_description="Tests history walking performance"
5 . ./perf-lib.sh
7 test_perf_default_repo
9 test_perf 'rev-list --all' '
10 git rev-list --all >/dev/null
13 test_perf 'rev-list --all --objects' '
14 git rev-list --all --objects >/dev/null
17 test_perf 'rev-list --parents' '
18 git rev-list --parents HEAD >/dev/null
21 test_expect_success 'create dummy file' '
22 echo unlikely-to-already-be-there >dummy &&
23 git add dummy &&
24 git commit -m dummy
27 test_perf 'rev-list -- dummy' '
28 git rev-list HEAD -- dummy
31 test_perf 'rev-list --parents -- dummy' '
32 git rev-list --parents HEAD -- dummy
35 test_expect_success 'create new unreferenced commit' '
36 commit=$(git commit-tree HEAD^{tree} -p HEAD) &&
37 test_export commit
40 test_perf 'rev-list $commit --not --all' '
41 git rev-list $commit --not --all >/dev/null
44 test_perf 'rev-list --objects $commit --not --all' '
45 git rev-list --objects $commit --not --all >/dev/null
48 test_done