diff --git a/main.go b/main.go index 60d2fcf..3f777ea 100644 --- a/main.go +++ b/main.go @@ -112,7 +112,6 @@ func main() { _, ltm, _ := lastTime.Clock() if llm != ltm { - processBuckets(lastTime, ab) ab = map[string]*Bucket{} @@ -152,7 +151,6 @@ func contains(host string) bool { } func processBuckets(lt time.Time, set map[string]*Bucket) { - log.Printf("printing buckets for %s", lt.Format(outDateFormatNoSeconds)) for host, _ := range set { if !contains(host) { seenHosts = append(seenHosts, host) @@ -161,12 +159,14 @@ func processBuckets(lt time.Time, set map[string]*Bucket) { sort.Sort(sort.StringSlice(seenHosts)) + log.Printf("%s printing %d buckets for %d hosts", lt.Format(outDateFormatNoSeconds), len(set), len(seenHosts)) + for _, host := range seenHosts { bucket, ok := set[host] if !ok { fmt.Printf("%s,%s,0,0,0,0\n", lt.Format(outDateFormat), host) - return + continue } var longest time.Duration