Sha256: 3e14665535ad1e92e32ba8673480973311cd3927190e07cf6869de7d32b4e551
Contents?: true
Size: 954 Bytes
Versions: 7
Compression:
Stored size: 954 Bytes
Contents
<?php function getBenchmarkGroups() { $redis = new Predis\Client(); $allBenchmarkGroups = array(); foreach($redis->smembers("benchmarks") as $title) { $allBenchmarks = array(); foreach($redis->smembers("benchmarks:{$title}") as $legend) { $points = $redis->lrange("benchmarks:{$title}:{$legend}",0,-1); $allBenchmarks[] = new Benchmark($title,$legend,$points); } $allBenchmarkGroups[] = $allBenchmarks; } return $allBenchmarkGroups; } function require_view($viewName) { require "../{$viewName}.html.php"; } function app_autoload($class_name) { if (file_exists("{$class_name}.php")) { require_once "{$class_name}.php"; return true; } return false; } spl_autoload_register('app_autoload'); require 'Predis/Autoloader.php'; Predis\Autoloader::register(); $GLOBALS["viewables"] = array(); $GLOBALS["viewables"]["benchmark_groups"] = getBenchmarkGroups(); require_view("benchmarks/index");
Version data entries
7 entries across 7 versions & 1 rubygems