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 / p5310-pack-bitmaps.sh

40 lines · 973 bytes Raw Blame History
1#!/bin/sh
2
3test_description='Tests pack performance using bitmaps'
4. ./perf-lib.sh
5. "${TEST_DIRECTORY}/perf/lib-bitmap.sh"
6
7test_lookup_pack_bitmap () {
8 test_expect_success 'start the test from scratch' '
9 rm -rf * .git
10 '
11
12 test_perf_large_repo
13
14 # note that we do everything through config,
15 # since we want to be able to compare bitmap-aware
16 # git versus non-bitmap git
17 #
18 # We intentionally use the deprecated pack.writebitmaps
19 # config so that we can test against older versions of git.
20 test_expect_success 'setup bitmap config' '
21 git config pack.writebitmaps true
22 '
23
24 # we need to create the tag up front such that it is covered by the repack and
25 # thus by generated bitmaps.
26 test_expect_success 'create tags' '
27 git tag --message="tag pointing to HEAD" perf-tag HEAD
28 '
29
30 test_perf "enable lookup table: $1" '
31 git config pack.writeBitmapLookupTable '"$1"'
32 '
33
34 test_pack_bitmap
35}
36
37test_lookup_pack_bitmap false
38test_lookup_pack_bitmap true
39
40test_done