p4205: add perf test script for pretty log formats
Add simple performance tests for expanded log format placeholders. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe committed
Jun 24, 2017 at 14:12 UTC
5a5bd5765ac5d180bf540ba7c6540a9f3dc16f4b
1 file changed
+16
t/perf/p4205-log-pretty-formats.sh
new
+16
@@ -0,0 +1,16 @@
1
+#!/bin/sh
2
+
3
+test_description='Tests the performance of various pretty format placeholders'
4
+
5
+. ./perf-lib.sh
6
+
7
+test_perf_default_repo
8
+
9
+for format in %H %h %T %t %P %p %h-%h-%h
10
+do
11
+ test_perf "log with $format" "
12
+ git log --format=\"$format\" >/dev/null
13
+ "
14
+done
15
+
16
+test_done