def total_events(treatment, event)
      experiment = treatment.experiment
      result = redis.hvals(event_key(experiment, treatment, event))
      result.map(&:to_i).reduce(&:+)
    end
def total_events(treatment, event)
      experiment = treatment.experiment
      result = redis.hvals(event_key(experiment, treatment, event))
      result.map(&:to_i).reduce(&:+)
    end
FIXME: Track total events separately to improve from O(N) to O(1).