2023-05-24 10:01:50 +03:00
|
|
|
package tree
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
2023-06-08 16:37:46 +03:00
|
|
|
type MetricsRegister interface {
|
|
|
|
AddReplicateTaskDuration(time.Duration, bool)
|
|
|
|
AddReplicateWaitDuration(time.Duration, bool)
|
|
|
|
AddSyncDuration(time.Duration, bool)
|
2025-03-05 15:44:15 +03:00
|
|
|
AddOperation(string, string)
|
2023-06-08 16:37:46 +03:00
|
|
|
}
|
|
|
|
|
2023-05-24 10:01:50 +03:00
|
|
|
type defaultMetricsRegister struct{}
|
|
|
|
|
|
|
|
func (defaultMetricsRegister) AddReplicateTaskDuration(time.Duration, bool) {}
|
|
|
|
func (defaultMetricsRegister) AddReplicateWaitDuration(time.Duration, bool) {}
|
|
|
|
func (defaultMetricsRegister) AddSyncDuration(time.Duration, bool) {}
|
2025-03-05 15:44:15 +03:00
|
|
|
func (defaultMetricsRegister) AddOperation(string, string) {}
|