Use seconds instead of nanoseconds for the store time layer metrics (#12321)
* Use nanoseconds instead of seconds for the api metrics * Using seconds instead of nanoseconds in the store layer metrics
Этот коммит содержится в:
коммит произвёл
Miguel de la Cruz
родитель
f257109953
Коммит
99f13ed0e6
@@ -246,14 +246,13 @@ func (s *{{$.Name}}{{$substoreName}}Store) {{$index}}({{$element.Params | joinPa
|
||||
{{ else }}
|
||||
{{$element.Results | genResultsVars}} := s.{{$substoreName}}Store.{{$index}}({{$element.Params | joinParams}})
|
||||
{{ end }}
|
||||
t := timemodule.Now()
|
||||
elapsed := t.Sub(start)
|
||||
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
success := "false"
|
||||
if {{$element.Results | errorToBoolean}} {
|
||||
success = "true"
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("{{$substoreName}}Store.{{$index}}", success, float64(elapsed))
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("{{$substoreName}}Store.{{$index}}", success, elapsed)
|
||||
}
|
||||
return {{$element.Results | genResultsVars}}
|
||||
}
|
||||
|
||||
2255
store/timer_layer.go
2255
store/timer_layer.go
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Ссылка в новой задаче
Block a user