We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29839a0 commit 90c1073Copy full SHA for 90c1073
third_party/cli_bench/cli_bench.pl
@@ -24,7 +24,12 @@
24
'ignore=i' => \$ignore,
25
);
26
27
-my $cmd = join(" ", @ARGV);
+
28
+my $cmd = trim(join(" ", @ARGV));
29
30
+if (!$cmd) {
31
+ die(usage());
32
+}
33
34
$| = 0; # Disable output buffering
35
@@ -49,6 +54,7 @@
49
54
50
55
# Remove the top and bottom 10%
51
56
my $outlier = $num / 10;
57
+@res = sort(@res);
52
58
@res = splice(@res, $outlier, $num - $outlier * 2);
53
59
60
my $avg = int(average(@res));
@@ -173,5 +179,8 @@ BEGIN
173
179
}
174
180
175
181
176
-# vim: tabstop=4 shiftwidth=4 autoindent softtabstop=4
182
+sub usage {
183
+ return "Usage: $0 [--num 50] 'cat /tmp/simple.diff | diff-so-fancy'\n";
184
177
185
186
+# vim: tabstop=4 shiftwidth=4 autoindent softtabstop=4
0 commit comments