summaryrefslogtreecommitdiff
path: root/t/t6012-rev-list-simplify.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2016-07-29 00:06:09 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-07-29 11:05:06 -0700
commit77023ea3c3951be97286bc241ae88bc6c860e2b7 (patch)
tree34f3e3ffbfb648afb6e2a59aed6985147f2235c3 /t/t6012-rev-list-simplify.sh
parentSixth batch of topics for 2.10 (diff)
downloadtgif-77023ea3c3951be97286bc241ae88bc6c860e2b7.tar.xz
t/perf: add tests for many-pack scenarios
Git's pack storage does efficient (log n) lookups in a single packfile's index, but if we have multiple packfiles, we have to linearly search each for a given object. This patch introduces some timing tests for cases where we have a large number of packs, so that we can measure any improvements we make in the following patches. The main thing we want to time is object lookup. To do this, we measure "git rev-list --objects --all", which does a fairly large number of object lookups (essentially one per object in the repository). However, we also measure the time to do a full repack, which is interesting for two reasons. One is that in addition to the usual pack lookup, it has its own linear iteration over the list of packs. And two is that because it it is the tool one uses to go from an inefficient many-pack situation back to a single pack, we care about its performance not only at marginal numbers of packs, but at the extreme cases (e.g., if you somehow end up with 5,000 packs, it is the only way to get back to 1 pack, so we need to make sure it performs well). We measure the performance of each command in three scenarios: 1 pack, 50 packs, and 1,000 packs. The 1-pack case is a baseline; any optimizations we do to handle multiple packs cannot possibly perform better than this. The 50-pack case is as far as Git should generally allow your repository to go, if you have auto-gc enabled with the default settings. So this represents the maximum performance improvement we would expect under normal circumstances. The 1,000-pack case is hopefully rare, though I have seen it in the wild where automatic maintenance was broken for some time (and the repository continued to receive pushes). This represents cases where we care less about general performance, but want to make sure that a full repack command does not take excessively long. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6012-rev-list-simplify.sh')
0 files changed, 0 insertions, 0 deletions