git.shiar.nl
/
barcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6a70549
)
report generic calc percentiles instead of min/max
author
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 10 Dec 2022 00:19:21 +0000
(
01:19
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 12 Dec 2022 22:56:34 +0000
(23:56 +0100)
barcat
patch
|
blob
|
history
diff --git
a/barcat
b/barcat
index a129091c4418f59b511f801236e6094e351bddd5..5fd0a16841389f3c4ad38899e4253ef30f91c299 100755
(executable)
--- a/
barcat
+++ b/
barcat
@@
-152,9
+152,9
@@
$opt{report} //= join('',
'${count#} values',
'${lines#; $_ = $_ != @order && " over $_ lines"}',
sprintf('${count: (%s)}', join ', ',
'${count#} values',
'${lines#; $_ = $_ != @order && " over $_ lines"}',
sprintf('${count: (%s)}', join ', ',
- '${
min
; color(31)} min',
+ '${
0v
; color(31)} min',
'${avg; $opt{reformat} or $_ = sprintf "%0.2f", $_; color(36)} avg',
'${avg; $opt{reformat} or $_ = sprintf "%0.2f", $_; color(36)} avg',
- '${
max
; color(32)} max',
+ '${
100v
; color(32)} max',
),
);
$opt{palette} //= $opt{color} && [31, 90, 32];
),
);
$opt{palette} //= $opt{color} && [31, 90, 32];
@@
-399,10
+399,6
@@
sub show_stat {
if (@order) {
$vars{partsum} = sum(0, grep {length} @values[$linemin .. $linemax])
if $linemin <= $linemax and ($opt{hidemin} or $opt{hidemax});
if (@order) {
$vars{partsum} = sum(0, grep {length} @values[$linemin .. $linemax])
if $linemin <= $linemax and ($opt{hidemin} or $opt{hidemax});
- %vars = (%vars,
- min => $order[-1],
- max => $order[0],
- );
}
say varfmt($opt{report}, \%vars);
return 1;
}
say varfmt($opt{report}, \%vars);
return 1;