You are here

function perfmon_get_last_test in Performance monitor 7

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

Retrieve the result from the last run of test.

Return value

array Return last results

See also

perfmon_get_stored_results()

1 call to perfmon_get_last_test()
_perfmon_run_test in ./perfmon.inc
Run a single Security Review check.

File

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

Code

function perfmon_get_last_test($testname) {
  $fields = array(
    'testname',
    'result',
    'lastrun',
  );
  $result = db_select('perfmon', 'sr')
    ->fields('sr', $fields)
    ->condition('testname', $testname)
    ->execute()
    ->fetchAssoc();
  if (!empty($result)) {
    return $result;
  }
  return FALSE;
}