aggiunti i tempi parziali
This commit is contained in:
parent
9c49a04667
commit
42bb907c47
1 changed files with 5 additions and 2 deletions
|
@ -14,7 +14,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
_VERSION = "v1.0.4"
|
_VERSION = "v1.0.5"
|
||||||
_tformat = "2006-01-02"
|
_tformat = "2006-01-02"
|
||||||
_24h = (time.Hour * 23) + (time.Minute * 59) + (time.Second * 59)
|
_24h = (time.Hour * 23) + (time.Minute * 59) + (time.Second * 59)
|
||||||
_10m = (time.Minute * 10)
|
_10m = (time.Minute * 10)
|
||||||
|
@ -179,6 +179,9 @@ func main() {
|
||||||
// fmt.Println(ys, ye)
|
// fmt.Println(ys, ye)
|
||||||
|
|
||||||
for i := range ys {
|
for i := range ys {
|
||||||
|
|
||||||
|
pStart := time.Now()
|
||||||
|
|
||||||
q := opts.ll.Find(bson.M{"date": bson.M{"$gte": ys[i], "$lte": ye[i]}}).Sort("user")
|
q := opts.ll.Find(bson.M{"date": bson.M{"$gte": ys[i], "$lte": ye[i]}}).Sort("user")
|
||||||
|
|
||||||
ar := []string{}
|
ar := []string{}
|
||||||
|
@ -223,7 +226,7 @@ func main() {
|
||||||
log.Println("Insert error: ", err)
|
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))
|
fmt.Println("Stop: ", time.Since(start))
|
||||||
|
|
Loading…
Add table
Reference in a new issue