Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit f54d2ba

Browse files
committed
sensible param names for mockCache
1 parent 3a21035 commit f54d2ba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mdata/cache/cache_mock.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ func NewMockCache() *MockCache {
2323
return &MockCache{}
2424
}
2525

26-
func (mc *MockCache) Add(m, r string, t uint32, i chunk.IterGen) {
26+
func (mc *MockCache) Add(metric, rawMetric string, prev uint32, itergen chunk.IterGen) {
2727
mc.Lock()
2828
defer mc.Unlock()
2929
mc.AddCount++
3030
}
3131

32-
func (mc *MockCache) CacheIfHot(m string, t uint32, i chunk.IterGen) {
32+
func (mc *MockCache) CacheIfHot(metric string, prev uint32, itergen chunk.IterGen) {
3333
mc.Lock()
3434
defer mc.Unlock()
3535
mc.CacheIfHotCount++
@@ -44,15 +44,15 @@ func (mc *MockCache) Stop() {
4444
mc.StopCount++
4545
}
4646

47-
func (mc *MockCache) Search(ctx context.Context, m string, f uint32, u uint32) *CCSearchResult {
47+
func (mc *MockCache) Search(ctx context.Context, metric string, from uint32, until uint32) *CCSearchResult {
4848
mc.Lock()
4949
defer mc.Unlock()
5050
mc.SearchCount++
5151
return nil
5252
}
5353

54-
func (mc *MockCache) DelMetric(key string) (int, int) {
55-
mc.DelMetricKeys = append(mc.DelMetricKeys, key)
54+
func (mc *MockCache) DelMetric(rawMetric string) (int, int) {
55+
mc.DelMetricKeys = append(mc.DelMetricKeys, rawMetric)
5656
return mc.DelMetricSeries, mc.DelMetricArchives
5757
}
5858

0 commit comments

Comments
 (0)