All checks were successful
DCO action / DCO (pull_request) Successful in 34s
Vulncheck / Vulncheck (pull_request) Successful in 1m6s
Build / Build Components (pull_request) Successful in 1m33s
Tests and linters / Run gofumpt (pull_request) Successful in 2m29s
Tests and linters / Lint (pull_request) Successful in 3m0s
Tests and linters / Staticcheck (pull_request) Successful in 2m59s
Tests and linters / Tests (pull_request) Successful in 3m15s
Tests and linters / gopls check (pull_request) Successful in 3m43s
Tests and linters / Tests with -race (pull_request) Successful in 5m42s
Pre-commit hooks / Pre-commit (pull_request) Successful in 58s
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) {}
|