| 1 | #!/bin/sh |
| 2 | |
| 3 | test_description='Tests pack performance using bitmaps' |
| 4 | . ./perf-lib.sh |
| 5 | |
| 6 | test_perf_large_repo |
| 7 | |
| 8 | test_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 | |
| 14 | for version in 1 2 |
| 15 | do |
| 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 | ' |
| 26 | done |
| 27 | |
| 28 | test_done |