All checks were successful
DCO action / DCO (pull_request) Successful in 30s
Vulncheck / Vulncheck (pull_request) Successful in 1m15s
Build / Build Components (pull_request) Successful in 1m34s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m36s
Tests and linters / Run gofumpt (pull_request) Successful in 1m52s
Tests and linters / Tests with -race (pull_request) Successful in 2m55s
Tests and linters / Staticcheck (pull_request) Successful in 2m55s
Tests and linters / Lint (pull_request) Successful in 3m3s
Tests and linters / Tests (pull_request) Successful in 3m17s
Tests and linters / gopls check (pull_request) Successful in 3m56s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
17 lines
581 B
Go
17 lines
581 B
Go
package tree
|
|
|
|
import "time"
|
|
|
|
type MetricsRegister interface {
|
|
AddReplicateTaskDuration(time.Duration, bool)
|
|
AddReplicateWaitDuration(time.Duration, bool)
|
|
AddSyncDuration(time.Duration, bool)
|
|
AddOperation(string, string)
|
|
}
|
|
|
|
type defaultMetricsRegister struct{}
|
|
|
|
func (defaultMetricsRegister) AddReplicateTaskDuration(time.Duration, bool) {}
|
|
func (defaultMetricsRegister) AddReplicateWaitDuration(time.Duration, bool) {}
|
|
func (defaultMetricsRegister) AddSyncDuration(time.Duration, bool) {}
|
|
func (defaultMetricsRegister) AddOperation(string, string) {}
|