Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function getKpi(Cache $cache) |
||
30 | { |
||
31 | $queryValues = [ |
||
32 | 'SELECT' => 'COUNT(DISTINCT allTrue.uid) / COUNT(DISTINCT hasGetRequireOnce.uid) as hitRate', |
||
33 | 'FROM' => "(SELECT uid,request_hash,entry_identifier,called_method FROM tx_cachecheck_domain_model_log WHERE cache_name = '" . $cache->getName() . "' AND called_method IN ('has', 'get', 'requireOnce')) hasGetRequireOnce, (SELECT uid,request_hash,entry_identifier,called_method FROM tx_cachecheck_domain_model_log WHERE cache_name = '" . $cache->getName() . "' AND called_method IN ('hasTRUE', 'getTRUE', 'requireOnceTRUE')) allTrue", |
||
34 | 'WHERE' => 'hasGetRequireOnce.entry_identifier = allTrue.entry_identifier AND hasGetRequireOnce.request_hash = allTrue.request_hash AND hasGetRequireOnce.uid < allTrue.uid', |
||
35 | ]; |
||
36 | return (float)$this->getDynamicFromDatabase($queryValues); |
||
37 | } |
||
38 | |||
51 |