diff --git a/charting/saml2.pl b/charting/saml2.pl index a0ccde17..bc69fd04 100755 --- a/charting/saml2.pl +++ b/charting/saml2.pl @@ -27,11 +27,21 @@ open(TXT, xalanCall . " -IN $fn -XSL saml2.xsl|") || die "could not open input file"; $_ = ; chop; + # print "$month: $_\n"; my ($entities, $idps, $sps, $saml2total, $saml2idp, $saml2sp) = split; - push @overallRatio, $saml2total/$entities; - push @idpRatio, $saml2idp/$idps; - push @spRatio, $saml2sp/$sps; - push @product, ($saml2idp/$idps)*($saml2sp/$sps); + if ($entities == 0) { + # print "skipping $month: $_\n"; + next; + } + my $mPrefix = $allMonths ? "$month: " : ''; + my $oRatio = $saml2total/$entities; + push @overallRatio, "$mPrefix$oRatio"; + my $iRatio = $saml2idp/$idps; + push @idpRatio, "$mPrefix$iRatio"; + my $sRatio = $saml2sp/$sps; + push @spRatio, "$mPrefix$sRatio"; + my $p = ($saml2idp/$idps)*($saml2sp/$sps); + push @product, "$mPrefix$p"; close TXT; } @@ -55,4 +65,4 @@ print "$ratio\n"; } -1; \ No newline at end of file +1;