You are here

function perfmon_get_stored_results in Performance monitor 7

Same name and namespace in other branches
  1. 8 perfmon.module \perfmon_get_stored_results()

Retrieve stored tests and results.

Return value

array Array of checks with keys: testname - string test name result - int result of test lastrun - UNIX timestamp of last time check ran

2 calls to perfmon_get_stored_results()
perfmon_page in ./perfmon.pages.inc
Page callback for run & review.
perfmon_requirements in ./perfmon.install
Implements hook_requirements().

File

./perfmon.module, line 96
TODO: Enter file description here.

Code

function perfmon_get_stored_results() {
  $tests = array();

  // Retrieve results from last run of the checklist.
  $result = db_query("SELECT testname, result, lastrun FROM {perfmon}");
  foreach ($result as $record) {
    $tests[] = array(
      'testname' => $record->testname,
      'result' => $record->result,
      'lastrun' => $record->lastrun,
    );
  }
  return $tests;
}