Compare commits
1 Commits
master
...
fix_bad_la
Author | SHA1 | Date | |
---|---|---|---|
![]() |
088333054c |
@@ -119,13 +119,6 @@ func (client *Client) readloop() {
|
||||
}
|
||||
|
||||
func (client *Client) processCommand(cmd Command) {
|
||||
client.server.metrics.Counter("client", "commands").Inc()
|
||||
|
||||
defer func(t time.Time) {
|
||||
v := client.server.metrics.SummaryVec("client", "command_duration_seconds")
|
||||
v.WithLabelValues(cmd.Code().String()).Observe(time.Now().Sub(t).Seconds())
|
||||
}(time.Now())
|
||||
|
||||
cmd.SetClient(client)
|
||||
|
||||
if !client.registered {
|
||||
@@ -144,6 +137,13 @@ func (client *Client) processCommand(cmd Command) {
|
||||
return
|
||||
}
|
||||
|
||||
client.server.metrics.Counter("client", "commands").Inc()
|
||||
|
||||
defer func(t time.Time) {
|
||||
v := client.server.metrics.SummaryVec("client", "command_duration_seconds")
|
||||
v.WithLabelValues(cmd.Code().String()).Observe(time.Now().Sub(t).Seconds())
|
||||
}(time.Now())
|
||||
|
||||
switch srvCmd.(type) {
|
||||
case *PingCommand, *PongCommand:
|
||||
client.Touch()
|
||||
|
Reference in New Issue
Block a user