diff --git a/lastlogin_consolidate.go b/lastlogin_consolidate.go index 2fdce48..c03687b 100644 --- a/lastlogin_consolidate.go +++ b/lastlogin_consolidate.go @@ -14,7 +14,7 @@ import ( ) const ( - _VERSION = "v1.0.4" + _VERSION = "v1.0.5" _tformat = "2006-01-02" _24h = (time.Hour * 23) + (time.Minute * 59) + (time.Second * 59) _10m = (time.Minute * 10) @@ -179,6 +179,9 @@ func main() { // fmt.Println(ys, ye) for i := range ys { + + pStart := time.Now() + q := opts.ll.Find(bson.M{"date": bson.M{"$gte": ys[i], "$lte": ye[i]}}).Sort("user") ar := []string{} @@ -223,7 +226,7 @@ func main() { log.Println("Insert error: ", err) } } - fmt.Printf("Stop %s: %s\n", ys[i], time.Since(start)) + fmt.Printf("Stop %s: %s\n", ys[i], time.Since(pStart)) } fmt.Println("Stop: ", time.Since(start))