From e8b62bdc57547ed165ff8d94592149250973e86c Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 28 May 2012 15:12:16 +0200 Subject: [PATCH] Fix drop event rate calculation. --- summarize.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.2