Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/perf/p5311-pack-bitmaps-fetch.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / perf / p5311-pack-bitmaps-fetch.sh` 62 lines ยท 1456 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='performance of fetches from bitmapped packs' 4 . ./perf-lib.sh 5 6 test_fetch_bitmaps () { 7 argv=$1 8 export argv 9 10 test_expect_success 'setup test directory' ' 11 rm -fr * .git 12 ' 13 14 test_perf_default_repo 15 16 test_expect_success "create bitmapped server repo ${argv:+($argv)}" ' 17 git config pack.writebitmaps true && 18 git repack -adF $argv 19 ' 20 21 test_size "size of bitmapped pack ${argv:+($argv)}" ' 22 test_file_size .git/objects/pack/pack-*.pack 23 ' 24 25 # simulate a fetch from a repository that last fetched N days ago, for 26 # various values of N. We do so by following the first-parent chain, 27 # and assume the first entry in the chain that is N days older than the current 28 # HEAD is where the HEAD would have been then. 29 for days in 1 2 4 8 16 32 64 128; do 30 title=$(printf '%10s' "($days days${argv:+, $argv})") 31 test_expect_success "setup revs from $days days ago" ' 32 now=$(git log -1 --format=%ct HEAD) && 33 then=$(($now - ($days * 86400))) && 34 tip=$(git rev-list -1 --first-parent --until=$then HEAD) && 35 { 36 echo HEAD && 37 echo ^$tip 38 } >revs 39 ' 40 41 test_perf "server $title" ' 42 git pack-objects --stdout --revs \ 43 --thin --delta-base-offset \ 44 tmp.pack 45 ' 46 47 test_size "size $title" ' 48 test_file_size tmp.pack 49 ' 50 51 test_perf "client $title" ' 52 git index-pack --stdin --fix-thin