public function __construct(&$result_file) { $columns = array(); $hw = array(); $sw = array(); foreach ($result_file->get_systems() as $system) { $columns[] = $system->get_identifier(); $hw[] = $system->get_hardware(); $sw[] = $system->get_software(); } $rows = array(); $table_data = array(); pts_result_file_analyzer::system_components_to_table($table_data, $columns, $rows, $hw); pts_result_file_analyzer::system_components_to_table($table_data, $columns, $rows, $sw); pts_result_file_analyzer::compact_result_table_data($table_data, $columns, true); // TODO: see if this true value works fine but if rendering starts messing up, disable it if (defined('OPENBENCHMARKING_IDS')) { foreach ($columns as &$column) { $column = new pts_graph_ir_value($column); $column->set_attribute('href', 'http://openbenchmarking.org/system/' . OPENBENCHMARKING_IDS . '/' . $column); } } parent::__construct($rows, $columns, $table_data, $result_file); $this->i['identifier_size'] *= 0.8; $this->column_heading_vertical = false; $this->graph_title = $result_file->get_title(); if (!defined('PHOROMATIC_EXPORT_VIEWER')) { pts_render::report_system_notes_to_table($result_file, $this); } }
public static function system_value_to_ir_value($value, $index) { // TODO XXX: Move this logic off to OpenBenchmarking.org script /* !in_array($index, array('Memory', 'System Memory', 'Desktop', 'Screen Resolution', 'System Layer')) && $search_break_characters = array('@', '(', '/', '+', '[', '<', '*', '"'); for($i = 0, $x = strlen($value); $i < $x; $i++) { if(in_array($value[$i], $search_break_characters)) { $value = substr($value, 0, $i); break; } } */ $ir = new pts_graph_ir_value($value); if ($value != 'Unknown' && $value != null) { $ir->set_attribute('href', 'http://openbenchmarking.org/s/' . $value); } return $ir; }