mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-13 07:27:43 +00:00
ease up on the stats rate
This commit is contained in:
parent
bfa1342c62
commit
0db6090f3e
1 changed files with 2 additions and 2 deletions
|
@ -29,13 +29,13 @@ func NewClient(id, secret string, statsd *statsd.Client) *Client {
|
|||
tracer := &httptrace.ClientTrace{
|
||||
GotConn: func(info httptrace.GotConnInfo) {
|
||||
if info.Reused {
|
||||
statsd.Incr("reddit.api.connections.reused", []string{}, 1.0)
|
||||
statsd.Incr("reddit.api.connections.reused", []string{}, 0.1)
|
||||
if info.WasIdle {
|
||||
idleTime := float64(int64(info.IdleTime) / int64(time.Millisecond))
|
||||
statsd.Histogram("reddit.api.connections.idle_time", idleTime, []string{}, 0.1)
|
||||
}
|
||||
} else {
|
||||
statsd.Incr("reddit.api.connections.created", []string{}, 1.0)
|
||||
statsd.Incr("reddit.api.connections.created", []string{}, 0.1)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue