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

Version Path
appstats-0.25.1 doc/benchmarks/index.php
appstats-0.25.0 doc/benchmarks/index.php
appstats-0.24.0 doc/benchmarks/index.php
appstats-0.23.5 doc/benchmarks/index.php
appstats-0.23.4 doc/benchmarks/index.php
appstats-0.23.3 doc/benchmarks/index.php
appstats-0.23.2 doc/benchmarks/index.php