frostfs-node/pkg/local_object_storage/pilorama/metrics.go
Dmitrii Stepanov 8bd6d8dd8c
All checks were successful
DCO action / DCO (pull_request) Successful in 43s
Vulncheck / Vulncheck (pull_request) Successful in 1m0s
Tests and linters / Run gofumpt (pull_request) Successful in 1m19s
Build / Build Components (pull_request) Successful in 1m26s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m31s
Tests and linters / Staticcheck (pull_request) Successful in 2m12s
Tests and linters / Tests with -race (pull_request) Successful in 2m38s
Tests and linters / Tests (pull_request) Successful in 3m0s
Tests and linters / Lint (pull_request) Successful in 3m14s
Tests and linters / gopls check (pull_request) Successful in 3m38s
[#9999] pilorama: Add IO tag label to metrics
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-02-24 11:36:17 +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) {}