X-Git-Url: https://git.sesse.net/?p=bursty;a=blobdiff_plain;f=summarize.pl;fp=summarize.pl;h=813023d131258b8a8794d990583cc5d2945d42ba;hp=545fa0e5bab3daecb2d3afad4b957c407f199844;hb=e8b62bdc57547ed165ff8d94592149250973e86c;hpb=fc6f7214ed765c6a1f76d84136d52424e747925e 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; }