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
|
@ -1,7 +1,7 @@
|
|||
package metrics
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-observability/metrics"
|
||||
|
@ -64,7 +64,7 @@ func newGCMetrics() *gcMetrics {
|
|||
func (m *gcMetrics) AddRunDuration(shardID string, d time.Duration, success bool) {
|
||||
m.runDuration.With(prometheus.Labels{
|
||||
gcShardID: shardID,
|
||||
gcSuccess: fmt.Sprintf("%v", success),
|
||||
gcSuccess: strconv.FormatBool(success),
|
||||
}).Add(d.Seconds())
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ func (m *gcMetrics) AddDeletedCount(shardID string, deleted, failed uint64) {
|
|||
func (m *gcMetrics) AddExpiredObjectCollectionDuration(shardID string, d time.Duration, success bool, objectType string) {
|
||||
m.expCollectDuration.With(prometheus.Labels{
|
||||
gcShardID: shardID,
|
||||
gcSuccess: fmt.Sprintf("%v", success),
|
||||
gcSuccess: strconv.FormatBool(success),
|
||||
gcObjectType: objectType,
|
||||
}).Add(d.Seconds())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue