From cc72456672a8e5c8966dfce0e7e3df0fd2916000 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Wed, 25 Jan 2017 11:38:16 -0800 Subject: [PATCH] forgot to commit --- main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 6e9edf0..e097891 100644 --- a/main.go +++ b/main.go @@ -156,14 +156,17 @@ func processBuckets(set map[string]*Bucket) { bucket := set[host] var longest time.Duration var shortest time.Duration - shortest = 9999 * time.Minute // make this absurdly large so everything is smaller var total time.Duration for _, entry := range bucket.Entries { + if shortest == 0 { + shortest = entry.TimeTook + } + switch true { case entry.TimeTook > longest: longest = entry.TimeTook - case entry.TimeTook < shortest: + case shortest > entry.TimeTook: shortest = entry.TimeTook }