/**
  * @param Metric $metric
  */
 private function publishMetric(Metric $metric)
 {
     if ($metric->getType() == Metric::TYPE_INCREMENT) {
         $this->beberleiCollector->increment($metric->getName());
     } elseif ($metric->getType() == Metric::TYPE_DECREMENT) {
         $this->beberleiCollector->decrement($metric->getName());
     } elseif ($metric->getType() == Metric::TYPE_TIMING) {
         $this->beberleiCollector->timing($metric->getName(), $metric->getValue());
     } else {
         $this->beberleiCollector->measure($metric->getName(), $metric->getValue());
     }
 }
 function it_auto_flushes_by_default(Collector $beberleiCollector)
 {
     $this->publish([]);
     $beberleiCollector->flush()->shouldBeCalled();
 }