aggiunti parametri per il monitoraggio

This commit is contained in:
Miki 2016-04-06 12:05:40 +02:00
parent 1ebc85d1c3
commit 34e86dd7fd
3 changed files with 46 additions and 14 deletions

View file

@ -12,7 +12,7 @@ import (
)
const (
_VERSION = "v1.2.1"
_VERSION = "v1.2.2"
_tformat = "2006-01-02"
_24h = (time.Hour * 23) + (time.Minute * 59) + (time.Second * 59)
_10m = (time.Minute * 10)
@ -30,8 +30,12 @@ var (
dbs = Dbs{}
countTOT = 0
countOK = 0
idb = InfluxdbOutput{
CountTOT: 0,
CountOK: 0,
Insert: 0,
Find: 0,
}
)
func main() {
@ -108,12 +112,12 @@ func main() {
log.Printf("Stop %s: %s\n", ys[i], time.Since(pStart))
}
stop := time.Since(start)
idb.Stop = time.Since(start)
fmt.Printf("Stop: OK: %d - TOT: %d - Time: %s\n\r", countOK, countTOT, stop)
log.Printf("Stop: OK: %d - TOT: %d - Time: %s\n\r", countOK, countTOT, stop)
fmt.Printf("Stop: OK: %d - TOT: %d - Time: %s\n\r", idb.CountOK, idb.CountTOT, idb.Stop)
log.Printf("Stop: OK: %d - TOT: %d - Time: %s\n\r", idb.CountOK, idb.CountTOT, idb.Stop)
if opts.Influxdb != "" {
writeStats(start, stop)
writeStats(start)
}
}