Medium sized Internalization made by flattener against megalog-2018-06-29
[andk-cpan-tools.git] / bin / quidi-stats-for-timb-20091127.pl
blobd5922dd78457909b9eb3a863ae9b63415dea9d03
1 #!/usr/bin/perl
3 use JSON::XS;
4 use YAML::Syck;
5 use FindBin;
6 use lib "$FindBin::Bin/../CPAN-Blame/lib";
7 use CPAN::Blame::Config::Cnntp;
9 $|=1;
10 my $root = "$CPAN::Blame::Config::Cnntp::Config->{solver_vardir}/workdir/solved";
11 my $distros = 0;
12 my $reports = 0;
13 my $is_x8664ltm = 0;
14 my $have_uselongdouble = 0;
15 open my $fh, ">", "$root.all.json";
16 my $json = JSON::XS->new->pretty(0)->indent(0)->space_before(0)->space_after(0);
17 opendir my $dh, $root or die "Could not opendir '$root': $!";
18 for my $dirent (readdir $dh) {
19 next unless $dirent =~ /\.slvdv$/;
20 my $slvdv = "$root/$dirent";
21 my $y = YAML::Syck::LoadFile $slvdv;
22 $distros++;
23 for my $rep (@{$y->{"==DATA=="}}) {
24 # x86_64-linux-thread-multi?
25 $reports++;
26 print $fh $json->encode($rep), "\n";
27 my $archname = $rep->{"conf:archname"};
28 if ($archname =~ /^x86_64-linux-thread-multi(-ld)?$/) {
29 $is_x8664ltm++;
30 if ($rep->{"conf:uselongdouble"} eq "define"){
31 $have_uselongdouble++;
35 my $jsonfilesize = -s "$root.all.json";
36 print "\rdistros[$distros]reports[$reports]is_x86...[$is_x8664ltm]have_uld[$have_uselongdouble]json[$jsonfilesize]";
38 close $fh;