github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/core/mock/stats_mock.go (about) 1 // Package mock provides a variety of mock implementations used for testing. 2 /* 3 * Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved. 4 */ 5 package mock 6 7 import ( 8 "github.com/NVIDIA/aistore/cmn/cos" 9 "github.com/NVIDIA/aistore/core/meta" 10 "github.com/NVIDIA/aistore/stats" 11 ) 12 13 type ( 14 StatsTracker struct{} 15 ) 16 17 // interface guard 18 var _ stats.Tracker = (*StatsTracker)(nil) 19 20 func NewStatsTracker() stats.Tracker { 21 return &StatsTracker{} 22 } 23 24 func (*StatsTracker) StartedUp() bool { return true } 25 func (*StatsTracker) Get(string) int64 { return 0 } 26 func (*StatsTracker) IncErr(string) {} 27 func (*StatsTracker) Inc(string) {} 28 func (*StatsTracker) Add(string, int64) {} 29 func (*StatsTracker) AddMany(...cos.NamedVal64) {} 30 func (*StatsTracker) RegMetrics(*meta.Snode) {} 31 func (*StatsTracker) GetMetricNames() cos.StrKVs { return nil } 32 func (*StatsTracker) GetStats() *stats.Node { return nil } 33 func (*StatsTracker) GetStatsV322() *stats.NodeV322 { return nil } 34 func (*StatsTracker) ResetStats(bool) {} 35 func (*StatsTracker) IsPrometheus() bool { return false }