summaryrefslogtreecommitdiff
path: root/t/perf/min_time.perl
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2013-09-27 17:19:40 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2013-09-27 17:19:40 +0000
commit7bf8e474d15414eda8520ba5258511d845ca6061 (patch)
tree417d6cfc8946fce8e2f87fdf3ec964036abd495c /t/perf/min_time.perl
parent45d74c4b0fe38218b4569a90da7102cf48d616c2 (diff)
parente230c568c4b9a991e3175e5f65171a566fd8e39c (diff)
downloadgit-7bf8e474d15414eda8520ba5258511d845ca6061.tar.gz
Merge tag 'v1.8.4' into baserock/morph
Git 1.8.4
Diffstat (limited to 't/perf/min_time.perl')
-rwxr-xr-xt/perf/min_time.perl21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/perf/min_time.perl b/t/perf/min_time.perl
new file mode 100755
index 0000000000..c1a2717e07
--- /dev/null
+++ b/t/perf/min_time.perl
@@ -0,0 +1,21 @@
+#!/usr/bin/perl
+
+my $minrt = 1e100;
+my $min;
+
+while (<>) {
+ # [h:]m:s.xx U.xx S.xx
+ /^(?:(\d+):)?(\d+):(\d+(?:\.\d+)?) (\d+(?:\.\d+)?) (\d+(?:\.\d+)?)$/
+ or die "bad input line: $_";
+ my $rt = ((defined $1 ? $1 : 0.0)*60+$2)*60+$3;
+ if ($rt < $minrt) {
+ $min = $_;
+ $minrt = $rt;
+ }
+}
+
+if (!defined $min) {
+ die "no input found";
+}
+
+print $min;