summaryrefslogtreecommitdiff
path: root/t/perf
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-07-05 20:32:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-07-05 20:32:56 (GMT)
commit5ab148dda0076a136b4afb385d96bd9cdc4d2590 (patch)
tree6e6876952e2e6a1154258c9a9e11428572d4dcf9 /t/perf
parent85ce4a6828a418a22c69a870b3e059481b4263d6 (diff)
parent70c49050d4a16a7e2990e4d3c91d9d12f62e631e (diff)
downloadgit-5ab148dda0076a136b4afb385d96bd9cdc4d2590.zip
git-5ab148dda0076a136b4afb385d96bd9cdc4d2590.tar.gz
git-5ab148dda0076a136b4afb385d96bd9cdc4d2590.tar.bz2
Merge branch 'rs/sha1-name-readdir-optim'
Optimize "what are the object names already taken in an alternate object database?" query that is used to derive the length of prefix an object name is uniquely abbreviated to. * rs/sha1-name-readdir-optim: sha1_file: guard against invalid loose subdirectory numbers sha1_file: let for_each_file_in_obj_subdir() handle subdir names p4205: add perf test script for pretty log formats sha1_name: cache readdir(3) results in find_short_object_filename()
Diffstat (limited to 't/perf')
-rwxr-xr-xt/perf/p4205-log-pretty-formats.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/perf/p4205-log-pretty-formats.sh b/t/perf/p4205-log-pretty-formats.sh
new file mode 100755
index 0000000..7c26f4f
--- /dev/null
+++ b/t/perf/p4205-log-pretty-formats.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+test_description='Tests the performance of various pretty format placeholders'
+
+. ./perf-lib.sh
+
+test_perf_default_repo
+
+for format in %H %h %T %t %P %p %h-%h-%h
+do
+ test_perf "log with $format" "
+ git log --format=\"$format\" >/dev/null
+ "
+done
+
+test_done