git://git.jankratochvil.net
/
massrebuild.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6800a0b
)
dtneededsize: +avg,+stddev
author
Jan Kratochvil
<jan.kratochvil@redhat.com>
Wed, 9 Sep 2020 07:18:43 +0000
(09:18 +0200)
committer
Jan Kratochvil
<jan.kratochvil@redhat.com>
Wed, 9 Sep 2020 07:18:43 +0000
(09:18 +0200)
dtneededsize
patch
|
blob
|
history
diff --git
a/dtneededsize
b/dtneededsize
index
1caeb10
..
61ea9b8
100755
(executable)
--- a/
dtneededsize
+++ b/
dtneededsize
@@
-4,6
+4,8
@@
use warnings;
use File::Basename qw(&dirname);
use File::Find;
use Data::Dumper;
use File::Basename qw(&dirname);
use File::Find;
use Data::Dumper;
+use Statistics::Basic::StdDev;
+use List::Util;
$|=1;
sub readfile {
$|=1;
sub readfile {
@@
-114,6
+116,8
@@
find {
my $dwzsizeall=0;
my $dwzsizeduplall=0;
my $dtsizeall=0;
my $dwzsizeall=0;
my $dwzsizeduplall=0;
my $dtsizeall=0;
+my @ratioall;
+my @ratioduplall;
my $computed=0;
BINFN: for my $binfn (@DEBUG) {
# warn "$binfn...\n".Dumper([sort @{$F{$binfn}{"needed"}}]);
my $computed=0;
BINFN: for my $binfn (@DEBUG) {
# warn "$binfn...\n".Dumper([sort @{$F{$binfn}{"needed"}}]);
@@
-190,8
+194,11
@@
warn "$binfn: ".Dumper(\%dwzcommons);
$dwzsizeall+=$dwzsizetot;
$dwzsizeduplall+=$dwzsizedupltot;
$dtsizeall+=$dtsizetot;
$dwzsizeall+=$dwzsizetot;
$dwzsizeduplall+=$dwzsizedupltot;
$dtsizeall+=$dtsizetot;
+ push @ratioall ,$dwzsizetot /$dtsizetot;
+ push @ratioduplall,$dwzsizedupltot/$dtsizetot;
# warn "$binfn done\n".Dumper([sort keys(%l)]);
}
# warn "$binfn done\n".Dumper([sort keys(%l)]);
}
-print "dwzsizeall =$dwzsizeall" ." dtsizeall=$dtsizeall =".$dwzsizeall /$dtsizeall."\n";
-print "dwzsizeduplall=$dwzsizeduplall"." dtsizeall=$dtsizeall =".$dwzsizeduplall/$dtsizeall."\n";
+print "dwzsizeall =$dwzsizeall" ." dtsizeall=$dtsizeall =".$dwzsizeall /$dtsizeall."
avg=".List::Util::sum(@ratioall )/@ratioall ." stddev=".Statistics::Basic::stddev(\@ratioall )."
\n";
+print "dwzsizeduplall=$dwzsizeduplall"." dtsizeall=$dtsizeall =".$dwzsizeduplall/$dtsizeall."
avg=".List::Util::sum(@ratioduplall)/@ratioduplall." stddev=".Statistics::Basic::stddev(\@ratioduplall)."
\n";
print "computed=$computed of DEBUG=".(0+@DEBUG)." =".$computed/@DEBUG."\n";
print "computed=$computed of DEBUG=".(0+@DEBUG)." =".$computed/@DEBUG."\n";
+#print Dumper \@ratioall;