Created
April 8, 2015 15:18
-
-
Save jmason/12dbed76219eddba5d9a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
open (IN, "<output_lines_prod_apps.csv") or die; | |
while (<IN>) { | |
($appid,$d,$n) = split(/,/); | |
$outputlines{$appid} = $n; | |
} | |
open (IN, "<zero_sessions_prod_apps.csv") or die; | |
while (<IN>) { | |
($appid,$d,$n) = split(/,/); | |
$zerosessions{$appid} = $n; | |
} | |
foreach my $appid (sort keys %zerosessions) { | |
my $o = $outputlines{$appid}; | |
my $z = $zerosessions{$appid}; | |
$ratio = ($z / (($z + $o) || 0.00001)) * 100.0; | |
printf("%06.2f appid: %05d zerosessions: %10d ok: %10d ratio%%: %6.2f\n", | |
$ratio, $appid, $z, $o, $ratio); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment