forked from TrueCloudLab/frostfs-node
[#442] Use strconv.FormatBool instead of untyped conversion
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
344d6b2ae1
commit
fb8fee0c8e
4 changed files with 14 additions and 12 deletions
|
@ -2,6 +2,7 @@ package metrics
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-observability/metrics"
|
||||
|
@ -46,7 +47,7 @@ func newMorphCacheMetrics() *morphCacheMetrics {
|
|||
func (m *morphCacheMetrics) AddNNSContractHashDuration(success bool, d time.Duration) {
|
||||
m.nnsContractHashDuration.With(
|
||||
prometheus.Labels{
|
||||
mcSuccess: fmt.Sprintf("%v", success),
|
||||
mcSuccess: strconv.FormatBool(success),
|
||||
},
|
||||
).Observe(float64(d))
|
||||
}
|
||||
|
@ -54,7 +55,7 @@ func (m *morphCacheMetrics) AddNNSContractHashDuration(success bool, d time.Dura
|
|||
func (m *morphCacheMetrics) AddGroupKeyDuration(success bool, d time.Duration) {
|
||||
m.groupKeyDuration.With(
|
||||
prometheus.Labels{
|
||||
mcSuccess: fmt.Sprintf("%v", success),
|
||||
mcSuccess: strconv.FormatBool(success),
|
||||
},
|
||||
).Observe(float64(d))
|
||||
}
|
||||
|
@ -62,7 +63,7 @@ func (m *morphCacheMetrics) AddGroupKeyDuration(success bool, d time.Duration) {
|
|||
func (m *morphCacheMetrics) AddTxHeightDuration(hash util.Uint256, success bool, d time.Duration) {
|
||||
m.txHeightDuration.With(
|
||||
prometheus.Labels{
|
||||
mcSuccess: fmt.Sprintf("%v", success),
|
||||
mcSuccess: strconv.FormatBool(success),
|
||||
},
|
||||
).Observe(float64(d))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue