code: func NewBatchReporter(reporter Reporter, interval time.Duration) Reporter {
  
  	br := &BatchReporter{
  		r:               reporter,
  		batchInterval:   interval,
  		caches:          make(map[string]*statCache),
  		shutdownBatchCh: make(chan struct{}),
  	}
  
  	go br.batchLoop()
  
  	return br
  }
docs: // NewBatchReporter creates a batching stat reporter. The interval parameter
  // specifies how often stats should be posted to the StatHat server.