for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Miss rate
*
* @package CacheCheck\Service\Analyzer
* @author Tim Lochmüller
*/
namespace HDNET\CacheCheck\Service\Analyzer;
use HDNET\CacheCheck\Domain\Model\Cache;
class MissRate extends AbstractAnalyzer
{
* Get the given KPI
* @param Cache $cache
* @return mixed
* @throws \HDNET\CacheCheck\Exception
public function getKpi(Cache $cache)
$hitRate = $this->getAnalyzer('HitRate');
return 1 - $hitRate->getKpi($cache);
}
* Format the given KPI
* @param mixed $kpi
* @return string
public function getFormat($kpi)
return round($kpi * 100, 2) . '%';