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 / p5314-name-hash.sh

28 lines · 566 bytes Raw Blame History
1#!/bin/sh
2
3test_description='Tests pack performance using bitmaps'
4. ./perf-lib.sh
5
6test_perf_large_repo
7
8test_size 'paths at head' '
9 git ls-tree -r --name-only HEAD >path-list &&
10 wc -l <path-list &&
11 test-tool name-hash <path-list >name-hashes
12'
13
14for version in 1 2
15do
16 test_size "distinct hash value: v$version" '
17 awk "{ print \$$version; }" <name-hashes | sort | \
18 uniq -c >name-hash-count &&
19 wc -l <name-hash-count
20 '
21
22 test_size "maximum multiplicity: v$version" '
23 sort -nr <name-hash-count | head -n 1 | \
24 awk "{ print \$1; }"
25 '
26done
27
28test_done