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/p0071-sort.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 / p0071-sort.sh` 52 lines ยท 910 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='Basic sort performance tests' 4 . ./perf-lib.sh 5 6 test_perf_default_repo 7 8 test_expect_success 'setup' ' 9 git ls-files --stage "*.[ch]" "*.sh" | 10 cut -f2 -d" " | 11 git cat-file --batch >unsorted 12 ' 13 14 test_perf 'sort(1) unsorted' ' 15 sort sorted 16 ' 17 18 test_expect_success 'reverse' ' 19 sort -r reversed 20 ' 21 22 for file in sorted reversed 23 do 24 test_perf "sort(1) $file" " 25 sort <$file >actual 26 " 27 done 28 29 for file in unsorted sorted reversed 30 do 31 32 test_perf "string_list_sort() $file" " 33 test-tool string-list sort <$file >actual 34 " 35 36 test_expect_success "string_list_sort() $file sorts like sort(1)" " 37 test_cmp_bin sorted actual 38 " 39 done 40 41 for file in unsorted sorted reversed 42 do 43 test_perf "DEFINE_LIST_SORT $file" " 44 test-tool mergesort sort <$file >actual 45 " 46 47 test_expect_success "DEFINE_LIST_SORT $file sorts like sort(1)" " 48 test_cmp_bin sorted actual 49 " 50 done 51 52 test_done