src/server/pfs/server/cache_stats.go
func RegisterCacheStats(cacheName string, groupCacheStats *groupcache.Stats) {
	c := &cacheStats{
		cacheName:    cacheName,
		descriptions: make(map[string]*prometheus.Desc),
		stats:        groupCacheStats,
	}
	if err := prometheus.Register(c); err != nil {
		// metrics may be redundantly registered; ignore these errors
		if _, ok := err.(prometheus.AlreadyRegisteredError); !ok {
			logrus.Infof("error registering prometheus metric: %v", err)
		}
	}
}
func RegisterCacheStats(cacheName string, groupCacheStats *groupcache.Stats) {
	c := &cacheStats{
		cacheName:    cacheName,
		descriptions: make(map[string]*prometheus.Desc),
		stats:        groupCacheStats,
	}
	if err := prometheus.Register(c); err != nil {
		// metrics may be redundantly registered; ignore these errors
		if _, ok := err.(prometheus.AlreadyRegisteredError); !ok {
			logrus.Infof("error registering prometheus metric: %v", err)
		}
	}
}
// RegisterCacheStats creates a new wrapper for groupcache stats that implements
// the prometheus.Collector interface, and registers it