frostfs-node/pkg/local_object_storage/pilorama/metrics.go
Dmitrii Stepanov 03445cdef6
Some checks failed
DCO action / DCO (pull_request) Successful in 41s
Vulncheck / Vulncheck (pull_request) Successful in 51s
Tests and linters / Run gofumpt (pull_request) Successful in 1m6s
Build / Build Components (pull_request) Successful in 1m25s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m25s
Tests and linters / Lint (pull_request) Failing after 1m45s
Tests and linters / Tests (pull_request) Successful in 2m8s
Tests and linters / Staticcheck (pull_request) Successful in 2m8s
Tests and linters / gopls check (pull_request) Successful in 2m48s
Tests and linters / Tests with -race (pull_request) Successful in 3m11s
[#9999] pilorama: Add IO tag label to metrics
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-02-18 14:00:18 +03:00

23 lines
641 B
Go

package pilorama
import (
"time"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard/mode"
)
type Metrics interface {
SetParentID(id string)
SetMode(m mode.ComponentMode)
Close()
AddMethodDuration(method string, d time.Duration, success bool, ioTag string)
}
type noopMetrics struct{}
func (m *noopMetrics) SetParentID(string) {}
func (m *noopMetrics) SetMode(mode.ComponentMode) {}
func (m *noopMetrics) Close() {}
func (m *noopMetrics) AddMethodDuration(string, time.Duration, bool, string) {}