Skip to content

Commit

Permalink
fix floating divide
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregory Russell committed Jan 23, 2019
1 parent b6a76fe commit 6d5693d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ func checkError(err error, w http.ResponseWriter, ipCount int, label string, tSt
case manager.ErrAnnotatorCacheFull:
// If it isn't loading, client should probably give up instead of retrying.
w.WriteHeader(http.StatusInternalServerError)
metrics.RequestTimeHistogramUsec.WithLabelValues(label, " reject (cache full)").Observe(float64(time.Since(tStart).Nanoseconds() / 1000))
metrics.RequestTimeHistogramUsec.WithLabelValues(label, " reject (cache full)").Observe(float64(time.Since(tStart).Nanoseconds()) / 1000)
default:
// If it isn't loading, client should probably give up instead of retrying.
w.WriteHeader(http.StatusInternalServerError)
metrics.RequestTimeHistogramUsec.WithLabelValues(label, "other").Observe(float64(time.Since(tStart).Nanoseconds() / 1000))
metrics.RequestTimeHistogramUsec.WithLabelValues(label, "other").Observe(float64(time.Since(tStart).Nanoseconds()) / 1000)
fmt.Fprintf(w, err.Error())
}
return true
Expand Down

0 comments on commit 6d5693d

Please sign in to comment.