Fix drop event rate calculation.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 28 May 2012 13:12:16 +0000 (15:12 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 28 May 2012 13:12:16 +0000 (15:12 +0200)
summarize.pl

index 545fa0e..813023d 100755 (executable)
@@ -21,7 +21,7 @@ while (<>) {
 
 for my $n (sort { $a <=> $b } keys %buckets) {
        my $drop_rate = $buckets{$n}->{'num_drops'} / ($n * $buckets{$n}->{'num_bursts'});
-       my $drop_event_rate = $buckets{$n}->{'num_drops'} / ($n * $buckets{$n}->{'num_bursts'});
+       my $drop_event_rate = ($buckets{$n}->{'bursts_with_drops'} // 0) / $buckets{$n}->{'num_bursts'};
        printf "%3d: drop_rate %.5f  drop_event_rate %.5f\n",
                $n, $drop_rate, $drop_event_rate; 
 }