func (c *RateRedisCounter) Total() (int64, error) {
	var total int64

	curTimeShard := c.timer.UnixNano() / int64(c.resolution)

	for i := 0; i < c.bucketsCount; i++ {
		key := c.makeKey(curTimeShard - int64(i))
		val, err := redis.Int64(c.conn.Do("GET", key))
		if err == redis.ErrNil {
			continue
		} else if err != nil {
			return 0, err
		}
		total += val
	}

	return total, nil
}
// Total returns the total value of this counter
Total returns the total value of this counter
// Total returns the total value of this counter
func (c *RateRedisCounter) Total() (int64, error) {
	var total int64
	curTimeShard := c.timer.UnixNano() / int64(c.resolution)
	for i := 0; i < c.bucketsCount; i++ {
		key := c.makeKey(curTimeShard - int64(i))
		val, err := redis.Int64(c.conn.Do("GET", key))
		if err == redis.ErrNil {
			continue
		} else if err != nil {
			return 0, err
		}
		total += val
	}
	return total, nil
}
func ( c * RateRedisCounter ) Total ( ) ( int64 , error ) { var total int64 curTimeShard := c . timer . UnixNano ( ) / int64 ( c . resolution ) for i := 0 ; i < c . bucketsCount ; i ++ { key := c . makeKey ( curTimeShard - int64 ( i ) ) val , err := redis . Int64 ( c . conn . Do ( " " , key ) ) if err == redis . ErrNil { continue } else if err != nil { return 0 , err } total += val } return total , nil }
Total returns the total value of this counter
Total returns the total value of this counter