Merge branch 'nd/shallow-clone'
[gitweb.git] / t / perf / perf-lib.sh
index c61d5351e1ff0b1b4431eb28553d0d882ebe7451..a8c9574291b87d9bb1906a9d61faa9b157178b76 100644 (file)
@@ -1,4 +1,6 @@
-#!/bin/sh
+# Performance testing framework.  Each perf script starts much like
+# a normal test script, except it sources this library instead of
+# test-lib.sh.  See t/perf/README for documentation.
 #
 # Copyright (c) 2011 Thomas Rast
 #
@@ -161,7 +163,7 @@ test_perf () {
                echo "$test_count" >>"$perf_results_dir"/$base.subtests
                echo "$1" >"$perf_results_dir"/$base.$test_count.descr
                if test -z "$verbose"; then
-                       echo -n "perf $test_count - $1:"
+                       printf "%s" "perf $test_count - $1:"
                else
                        echo "perf $test_count - $1:"
                fi
@@ -170,7 +172,7 @@ test_perf () {
                        if test_run_perf_ "$2"
                        then
                                if test -z "$verbose"; then
-                                       echo -n " $i"
+                                       printf " %s" "$i"
                                else
                                        echo "* timing run $i/$GIT_PERF_REPEAT_COUNT:"
                                fi