All checks were successful
DCO action / DCO (pull_request) Successful in 33s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m17s
Vulncheck / Vulncheck (pull_request) Successful in 1m14s
Build / Build Components (pull_request) Successful in 1m19s
Tests and linters / Run gofumpt (pull_request) Successful in 1m35s
Tests and linters / Staticcheck (pull_request) Successful in 1m59s
Tests and linters / Tests (pull_request) Successful in 2m36s
Tests and linters / Lint (pull_request) Successful in 2m40s
Tests and linters / gopls check (pull_request) Successful in 3m17s
Tests and linters / Tests with -race (pull_request) Successful in 4m43s
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) {}
|