X-Git-Url: https://git.jankratochvil.net/?p=massrebuild.git;a=blobdiff_plain;f=dtneededsize;fp=dtneededsize;h=61ea9b8294c5b69b70ce7a64bfee5558f5375461;hp=1caeb10d60f7062d363a42cb8c41cbebcb67876a;hb=3a0826600210f718dbd773934e84eb6dd09c6a59;hpb=6800a0b64f1c9709c91a9778efe964cdde0cd0aa diff --git a/dtneededsize b/dtneededsize index 1caeb10..61ea9b8 100755 --- a/dtneededsize +++ b/dtneededsize @@ -4,6 +4,8 @@ use warnings; use File::Basename qw(&dirname); use File::Find; use Data::Dumper; +use Statistics::Basic::StdDev; +use List::Util; $|=1; sub readfile { @@ -114,6 +116,8 @@ find { 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"}}]); @@ -190,8 +194,11 @@ warn "$binfn: ".Dumper(\%dwzcommons); $dwzsizeall+=$dwzsizetot; $dwzsizeduplall+=$dwzsizedupltot; $dtsizeall+=$dtsizetot; + push @ratioall ,$dwzsizetot /$dtsizetot; + push @ratioduplall,$dwzsizedupltot/$dtsizetot; # 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 Dumper \@ratioall;