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"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
@ -148,7 +149,7 @@ func (m *writeCacheMetrics) SetMode(shardID string, mode string) {
|
|||
func (m *writeCacheMetrics) IncFlushCounter(shardID string, success bool, storageType string) {
|
||||
m.flushCounter.With(prometheus.Labels{
|
||||
wcShardID: shardID,
|
||||
wcSuccess: fmt.Sprintf("%v", success),
|
||||
wcSuccess: strconv.FormatBool(success),
|
||||
wcStorage: storageType,
|
||||
}).Inc()
|
||||
}
|
||||
|
@ -164,7 +165,7 @@ func setWriteCacheDuration(m *prometheus.HistogramVec, shardID string, success b
|
|||
m.With(
|
||||
prometheus.Labels{
|
||||
wcShardID: shardID,
|
||||
wcSuccess: fmt.Sprintf("%v", success),
|
||||
wcSuccess: strconv.FormatBool(success),
|
||||
wcStorage: storageType,
|
||||
},
|
||||
).Observe(d.Seconds())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue