|
|
# Benchmarking
|
|
|
|
|
|
```PHP
|
|
|
class IndexController extends \Hazaar\Controller\Basic {
|
|
|
|
|
|
protected function init() {
|
|
|
|
|
|
}
|
|
|
|
|
|
public function index() {
|
|
|
|
|
|
dump(\Hazaar\Cache\Benchmark::getAvailableBackends());
|
|
|
|
|
|
$configs = array(
|
|
|
'file' => null,
|
|
|
'redis' => array(
|
|
|
'server' => '10.0.0.31'
|
|
|
),
|
|
|
'apc' => null,
|
|
|
'memcached' => array(
|
|
|
'server' => '10.0.0.31'
|
|
|
)
|
|
|
);
|
|
|
|
|
|
$bench = new \Hazaar\Cache\Benchmark(null, $configs);
|
|
|
|
|
|
dump($bench->run(8388608, 8388608));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
``` |
|
|
\ No newline at end of file |