]> git.sesse.net Git - bursty/commitdiff
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 545fa0e5bab3daecb2d3afad4b957c407f199844..813023d131258b8a8794d990583cc5d2945d42ba 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; 
 }