Exemple #1
0
 /**
  * @return array
  */
 public function getTestData()
 {
     static $result;
     if (!isset($result)) {
         $values = $this->_jbsession->getGroup($this->_sessionGroup);
         $values = $this->app->data->create($values);
         $result = array('engine' => array(array('key' => 'engine_init', 'type' => 'less', 'value' => $values->get('engine_init', '-'), 'standart' => 0.25, 'postfix' => 'in_sec'), array('key' => 'memory_peak', 'type' => 'less', 'value' => $values->get('memory_peak', '-'), 'standart' => 15728640, 'postfix' => '')), 'cpu' => array(array('key' => 'cpu_complex', 'type' => 'more', 'value' => $values->get('cpu_complex', '-'), 'standart' => 9.0, 'postfix' => 'mil_in_sec'), array('key' => 'cpu_sin', 'type' => 'less', 'value' => $values->get('cpu_sin', '-'), 'standart' => 0.3, 'postfix' => 'in_sec'), array('key' => 'cpu_concat_dot', 'type' => 'less', 'value' => $values->get('cpu_concat_dot', '-'), 'standart' => 0.2, 'postfix' => 'in_sec'), array('key' => 'cpu_concat_quotes', 'type' => 'less', 'value' => $values->get('cpu_concat_quotes', '-'), 'standart' => 0.25, 'postfix' => 'in_sec'), array('key' => 'cpu_concat_array', 'type' => 'less', 'value' => $values->get('cpu_concat_array', '-'), 'standart' => 0.6, 'postfix' => 'in_sec')), 'mysql' => array(array('key' => 'mysql_connect', 'type' => 'less', 'value' => $values->get('mysql_connect', '-'), 'standart' => 0.005, 'postfix' => 'in_sec'), array('key' => 'mysql_sin', 'type' => 'less', 'value' => $values->get('mysql_sin', '-'), 'standart' => 0.1, 'postfix' => 'in_sec'), array('key' => 'mysql_insert', 'type' => 'less', 'value' => $values->get('mysql_insert', '-'), 'standart' => 3.0, 'postfix' => 'in_sec'), array('key' => 'mysql_select', 'type' => 'less', 'value' => $values->get('mysql_select', '-'), 'standart' => 0.03, 'postfix' => 'in_sec'), array('key' => 'mysql_insert_joomla', 'type' => 'less', 'value' => $values->get('mysql_insert_joomla', '-'), 'standart' => 0.25, 'postfix' => 'in_sec'), array('key' => 'mysql_select_joomla', 'type' => 'less', 'value' => $values->get('mysql_select_joomla', '-'), 'standart' => 0.03, 'postfix' => 'in_sec'), array('key' => 'mysql_select_advance', 'type' => 'more', 'value' => $values->get('mysql_select_advance', '-'), 'standart' => 7800, 'postfix' => ''), array('key' => 'mysql_insert_advance', 'type' => 'more', 'value' => $values->get('mysql_insert_advance', '-'), 'standart' => 5600, 'postfix' => ''), array('key' => 'mysql_replace_advance', 'type' => 'more', 'value' => $values->get('mysql_replace_advance', '-'), 'standart' => 5800, 'postfix' => ''), array('key' => 'db_uptime', 'type' => 'more', 'value' => $values->get('db_uptime', '-'), 'standart' => 1, 'postfix' => 'days'), array('key' => 'db_send', 'type' => 'less', 'value' => $values->get('db_send', '-'), 'standart' => 100000000, 'postfix' => ''), array('key' => 'db_connections', 'type' => 'less', 'value' => $values->get('db_connections', '-'), 'standart' => 300, 'postfix' => ''), array('key' => 'db_select_count', 'type' => 'less', 'value' => $values->get('db_select_count', '-'), 'standart' => 10000, 'postfix' => '')), 'fs' => array(array('key' => 'fs_simple', 'type' => 'more', 'value' => $values->get('fs_simple', '-'), 'standart' => 20000, 'postfix' => ''), array('key' => 'fs_complex', 'type' => 'more', 'value' => $values->get('fs_complex', '-'), 'standart' => 8000, 'postfix' => ''), array('key' => 'fs_complex_joomla', 'type' => 'more', 'value' => $values->get('fs_complex_joomla', '-'), 'standart' => 6000, 'postfix' => ''), array('key' => 'fs_write', 'type' => 'less', 'value' => $values->get('fs_write', '-'), 'standart' => 3.5, 'postfix' => 'in_sec'), array('key' => 'fs_read', 'type' => 'less', 'value' => $values->get('fs_read', '-'), 'standart' => 0.35, 'postfix' => 'in_sec')), 'mail' => array(array('key' => 'mail_joomla', 'type' => 'less', 'value' => $values->get('mail_joomla', '-'), 'standart' => 0.12, 'postfix' => 'in_sec'), array('key' => 'mail_php', 'type' => 'less', 'value' => $values->get('mail_php', '-'), 'standart' => 0.1, 'postfix' => 'in_sec')), 'others' => array(array('key' => 'session_init', 'type' => 'less', 'value' => $values->get('session_init', '-'), 'standart' => 0.005, 'postfix' => 'in_sec'), array('key' => 'realpath_used', 'type' => 'less', 'value' => $values->get('realpath_used', '-'), 'standart' => 786432, 'postfix' => ''), array('key' => 'realpath_remaining', 'type' => 'more', 'value' => $values->get('realpath_remaining', '-'), 'standart' => 262144, 'postfix' => ''), array('key' => 'system_loadavg', 'type' => 'less', 'value' => $values->get('system_loadavg', '-'), 'standart' => 5.0, 'postfix' => '')), 'version' => array(array('key' => 'version_os', 'type' => 'none', 'value' => $values->get('version_os', '-'), 'standart' => 'Linux-like system', 'postfix' => ''), array('key' => 'version_php', 'type' => 'none', 'value' => $values->get('version_php', '-'), 'standart' => '5.3.x+', 'postfix' => ''), array('key' => 'version_mysql', 'type' => 'none', 'value' => $values->get('version_mysql', '-'), 'standart' => '5.x+', 'postfix' => ''), array('key' => 'version_joomla', 'type' => 'none', 'value' => $values->get('version_joomla', '-'), 'standart' => '3.1.x+', 'postfix' => ''), array('key' => 'version_zoo', 'type' => 'none', 'value' => $values->get('version_zoo', '-'), 'standart' => '3.1.x+', 'postfix' => ''), array('key' => 'version_jbzoo', 'type' => 'none', 'value' => $values->get('version_jbzoo', '-'), 'standart' => '2.1.x+', 'postfix' => '')), 'result' => array(array('key' => 'total_engine', 'type' => 'more', 'value' => $values->get('total_engine', '-'), 'standart' => 0, 'postfix' => ''), array('key' => 'total_cpu', 'type' => 'more', 'value' => $values->get('total_cpu', '-'), 'standart' => 0, 'postfix' => ''), array('key' => 'total_mysql', 'type' => 'more', 'value' => $values->get('total_mysql', '-'), 'standart' => 0, 'postfix' => ''), array('key' => 'total_mail', 'type' => 'more', 'value' => $values->get('total_mail', '-'), 'standart' => 0, 'postfix' => ''), array('key' => 'total_fs', 'type' => 'more', 'value' => $values->get('total_fs', '-'), 'standart' => 0, 'postfix' => ''), array('key' => 'total_score', 'type' => 'more', 'value' => $values->get('total_score', '-'), 'standart' => 0, 'postfix' => ''), array('key' => 'total_fail', 'type' => 'less', 'value' => $values->get('total_fail', '-'), 'standart' => 0, 'postfix' => '')));
     }
     return $result;
 }