convert to timing stat

This commit is contained in:
Todd Gruben 2015-02-23 17:39:25 +00:00
parent 7b9472bffe
commit 19ccc192ae

View file

@ -3,6 +3,7 @@ package util
import (
log "github.com/cihub/seelog"
"pilosa/config"
"time"
"github.com/cactus/go-statsd-client/statsd"
)
@ -45,8 +46,8 @@ func init() {
func SendTimer(stat string, delta int64) {
pstat := "pilosa." + stat
milli := delta / time.Millisecond
timer <- args{pstat, milli, 1.0}
milli := time.Duration(delta) / time.Millisecond
timer <- args{pstat, int64(milli), 1.0}
}
func SendInc(stat string) {
pstat := "pilosa." + stat