From: Steinar H. Gunderson Date: Mon, 28 May 2012 13:12:16 +0000 (+0200) Subject: Fix drop event rate calculation. X-Git-Url: https://git.sesse.net/?p=bursty;a=commitdiff_plain;h=e8b62bdc57547ed165ff8d94592149250973e86c Fix drop event rate calculation. --- diff --git a/summarize.pl b/summarize.pl index 545fa0e..813023d 100755 --- a/summarize.pl +++ b/summarize.pl @@ -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; }