summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2021-10-01 11:19:51 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-10-01 12:43:09 -0700
commit40bc872adbeb9eff4bb2504730b901decb0aead5 (patch)
tree221750fad06e4d327c0fa47c963b135bb36c64d8
parentp0071: measure sorting of already sorted and reversed files (diff)
downloadtgif-40bc872adbeb9eff4bb2504730b901decb0aead5.tar.xz
p0071: test performance of llist_mergesort()
Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/perf/p0071-sort.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/perf/p0071-sort.sh b/t/perf/p0071-sort.sh
index 5b39b68f35..ed366e2e12 100755
--- a/t/perf/p0071-sort.sh
+++ b/t/perf/p0071-sort.sh
@@ -38,4 +38,15 @@ do
"
done
+for file in unsorted sorted reversed
+do
+ test_perf "llist_mergesort() $file" "
+ test-tool mergesort sort <$file >actual
+ "
+
+ test_expect_success "llist_mergesort() $file sorts like sort(1)" "
+ test_cmp_bin sorted actual
+ "
+done
+
test_done