public function getMetric($class, $metric)
    {
        $metrics = $this->getResult($class)->getMetrics();

        if (!isset($metrics[$metric])) {
            throw new \InvalidArgumentException(sprintf(
                'Unknown metric "%s" for result class "%s". Available metrics: "%s"',
                $metric, $class, implode('", "', array_keys($metrics))
            ));
        }

        return $metrics[$metric];
    }