File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ type Group interface {
39
39
Remove (context.Context , string ) error
40
40
UsedBytes () (int64 , int64 )
41
41
Name () string
42
+ ExportCacheStats (CacheType ) CacheStats
43
+ ExportGroupStats () GroupStats
42
44
}
43
45
44
46
// A Getter loads data for a key.
@@ -110,6 +112,14 @@ func (g *group) UsedBytes() (mainCache int64, hotCache int64) {
110
112
return g .mainCache .Bytes (), g .hotCache .Bytes ()
111
113
}
112
114
115
+ func (g * group ) ExportCacheStats (which CacheType ) CacheStats {
116
+ return g .CacheStats (which )
117
+ }
118
+
119
+ func (g * group ) ExportGroupStats () GroupStats {
120
+ return g .Stats
121
+ }
122
+
113
123
func (g * group ) Get (ctx context.Context , key string , dest transport.Sink ) error {
114
124
g .Stats .Gets .Add (1 )
115
125
if dest == nil {
You can’t perform that action at this time.
0 commit comments