diff options
-rw-r--r-- | TYDAL-CHANGE-LOG | 1 | ||||
-rw-r--r-- | pts-core/functions/pts-functions-merge.php | 12 | ||||
-rw-r--r-- | pts-core/functions/pts-functions-run.php | 1 | ||||
-rw-r--r-- | pts-core/functions/pts-functions_tests.php | 3 | ||||
-rw-r--r-- | pts-core/functions/pts-interfaces.php | 2 | ||||
-rw-r--r-- | pts-core/objects/pts_test_result.php | 10 |
6 files changed, 29 insertions, 0 deletions
diff --git a/TYDAL-CHANGE-LOG b/TYDAL-CHANGE-LOG index 4fa09df..af34a6e 100644 --- a/TYDAL-CHANGE-LOG +++ b/TYDAL-CHANGE-LOG @@ -9,6 +9,7 @@ Phoronix Test Suite (Git) - pts-core: Add support for dynamically loading objects from sub-directories of pts-core/objects/ - pts-core: Add validate-result mode that PTS test profiles can implement - pts-core: Fix reporting erroneous motherboard string (Found on QEMU virtualized system) +- pts-core: Add and implement RawString to XML results specification for storing raw result values from all trial runs - tandem_XmlReader: Major performance improvements and optimizations - bilde_renderer: New PTS-spawned abstracted image rendering interface that supports SVG and PNG rendering with a standard API - pts_Graph: Various changes to the graphing object diff --git a/pts-core/functions/pts-functions-merge.php b/pts-core/functions/pts-functions-merge.php index 570854a..8d81fd8 100644 --- a/pts-core/functions/pts-functions-merge.php +++ b/pts-core/functions/pts-functions-merge.php @@ -55,12 +55,14 @@ function pts_merge_test_results($OLD_RESULTS, $NEW_RESULTS) $new_results_identifiers = array(); $new_results_values = array(); + $new_results_rawvalues = array(); foreach($new_results_raw as $new_result_raw) { $new_xml_results = new tandem_XmlReader($new_result_raw); array_push($new_results_identifiers, $new_xml_results->getXMLArrayValues(S_RESULTS_RESULTS_GROUP_IDENTIFIER)); array_push($new_results_values, $new_xml_results->getXMLArrayValues(S_RESULTS_RESULTS_GROUP_VALUE)); + array_push($new_results_rawvalues, $new_xml_results->getXMLArrayValues(S_RESULTS_RESULTS_GROUP_RAW)); } unset($NEW_RESULTS, $new_xml_reader, $new_results_raw); @@ -90,12 +92,14 @@ function pts_merge_test_results($OLD_RESULTS, $NEW_RESULTS) $original_results_identifiers = array(); $original_results_values = array(); + $original_results_rawvalues = array(); foreach($original_results_raw as $original_result_raw) { $original_xml_results = new tandem_XmlReader($original_result_raw); array_push($original_results_identifiers, $original_xml_results->getXMLArrayValues(S_RESULTS_RESULTS_GROUP_IDENTIFIER)); array_push($original_results_values, $original_xml_results->getXMLArrayValues(S_RESULTS_RESULTS_GROUP_VALUE)); + array_push($original_results_rawvalues, $original_xml_results->getXMLArrayValues(S_RESULTS_RESULTS_GROUP_RAW)); } unset($OLD_RESULTS, $original_xml_reader, $original_results_raw); @@ -192,11 +196,13 @@ function pts_merge_test_results($OLD_RESULTS, $NEW_RESULTS) { $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_IDENTIFIER, $USE_ID, $original_results_identifiers[$r_o][$o], 5, "o-$r_o-$o"); $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_VALUE, $USE_ID, $original_results_values[$r_o][$o], 5, "o-$r_o-$o"); + $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_RAW, $USE_ID, $original_results_rawvalues[$r_o][$o], 5, "o-$r_o-$o"); } for($o = 0; $o < count($new_results_identifiers[$r_n]); $o++) { $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_IDENTIFIER, $USE_ID, $new_results_identifiers[$r_n][$o], 5, "n-$r_n-$o"); $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_VALUE, $USE_ID, $new_results_values[$r_n][$o], 5, "n-$r_n-$o"); + $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_RAW, $USE_ID, $new_results_rawvalues[$r_n][$o], 5, "n-$r_n-$o"); } $original_results_identifiers[$r_o] = ""; @@ -226,6 +232,7 @@ function pts_merge_test_results($OLD_RESULTS, $NEW_RESULTS) { $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_IDENTIFIER, $USE_ID, $original_results_identifiers[$r_o][$o], 5, "o-$r_o-$o-s"); $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_VALUE, $USE_ID, $original_results_values[$r_o][$o], 5, "o-$r_o-$o-s"); + $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_RAW, $USE_ID, $original_results_rawvalues[$r_o][$o], 5, "o-$r_o-$o-s"); } $original_results_identifiers[$r_o] = ""; @@ -249,6 +256,7 @@ function pts_merge_test_results($OLD_RESULTS, $NEW_RESULTS) { $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_IDENTIFIER, $USE_ID, $new_results_identifiers[$r_n][$o], 5, "n-$r_n-$o-s"); $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_VALUE, $USE_ID, $new_results_values[$r_n][$o], 5, "n-$r_n-$o-s"); + $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_RAW, $USE_ID, $new_results_rawvalues[$r_n][$o], 5, "n-$r_n-$o-s"); } $new_results_identifiers[$r_n] = ""; @@ -291,12 +299,14 @@ function pts_merge_batch_tests_to_line_comparison($RESULT) $results_identifiers = array(); $results_values = array(); + $results_rawvalues = array(); foreach($results_raw as $result_raw) { $xml_results = new tandem_XmlReader($result_raw); array_push($results_identifiers, $xml_results->getXMLArrayValues(S_RESULTS_RESULTS_GROUP_IDENTIFIER)); array_push($results_values, $xml_results->getXMLArrayValues(S_RESULTS_RESULTS_GROUP_VALUE)); + array_push($results_rawvalues, $xml_results->getXMLArrayValues(S_RESULTS_RESULTS_GROUP_RAW)); } // Some other work @@ -408,6 +418,7 @@ function pts_merge_batch_tests_to_line_comparison($RESULT) $show_attribute = trim(array_pop(explode(":", $test_attribute))); $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_IDENTIFIER, $USE_ID, $show_attribute, 5, "o-$r_o-$o"); $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_VALUE, $USE_ID, $results_values[$r_o][$o], 5, "o-$r_o-$o"); + $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_RAW, $USE_ID, $results_rawvalues[$r_o][$o], 5, "o-$r_o-$o"); } } @@ -416,6 +427,7 @@ function pts_merge_batch_tests_to_line_comparison($RESULT) $show_attribute = trim(array_pop(explode(":", array_pop($r_n_test_attributes)))); $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_IDENTIFIER, $USE_ID, $show_attribute, 5, "n-$r_n-$o"); $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_VALUE, $USE_ID, $results_values[$r_n][$o], 5, "n-$r_n-$o"); + $RESULTS->addXmlObject(P_RESULTS_RESULTS_GROUP_RAW, $USE_ID, $results_rawvalues[$r_n][$o], 5, "n-$r_n-$o"); } $results_testname[$r_n] = null; $has_merged = true; diff --git a/pts-core/functions/pts-functions-run.php b/pts-core/functions/pts-functions-run.php index f4b7978..b9178c3 100644 --- a/pts-core/functions/pts-functions-run.php +++ b/pts-core/functions/pts-functions-run.php @@ -386,6 +386,7 @@ function pts_record_test_result(&$tandem_xml, $result, $identifier, $tandem_id = $tandem_xml->addXmlObject(P_RESULTS_TEST_ARGUMENTS, $tandem_id, $result->get_attribute("EXTRA_ARGUMENTS")); $tandem_xml->addXmlObject(P_RESULTS_RESULTS_GROUP_IDENTIFIER, $tandem_id, $identifier, 5); $tandem_xml->addXmlObject(P_RESULTS_RESULTS_GROUP_VALUE, $tandem_id, $result->get_result(), 5); + $tandem_xml->addXmlObject(P_RESULTS_RESULTS_GROUP_RAW, $tandem_id, $result->get_trial_results_string(), 5); pts_set_assignment("TEST_RAN", true); } diff --git a/pts-core/functions/pts-functions_tests.php b/pts-core/functions/pts-functions_tests.php index 5dcb7db..815690d 100644 --- a/pts-core/functions/pts-functions_tests.php +++ b/pts-core/functions/pts-functions_tests.php @@ -85,12 +85,14 @@ function pts_save_result($save_to = null, $save_results = null) $results_identifiers = array(); $results_values = array(); + $results_rawvalues = array(); foreach($results_raw as $result_raw) { $xml_results = new tandem_XmlReader($result_raw); array_push($results_identifiers, $xml_results->getXMLArrayValues(S_RESULTS_RESULTS_GROUP_IDENTIFIER)); array_push($results_values, $xml_results->getXMLArrayValues(S_RESULTS_RESULTS_GROUP_VALUE)); + array_push($results_rawvalues, $xml_results->getXMLArrayValues(S_RESULTS_RESULTS_GROUP_RAW)); } for($i = 0; $i < count($results_name); $i++) @@ -139,6 +141,7 @@ function pts_save_result($save_to = null, $save_results = null) $t->loadGraphIdentifiers($results_identifiers[$i]); $t->loadGraphValues($results_values[$i]); + // use $results_rawvalues[$i] $t->loadGraphProportion($results_proportion[$i]); $t->loadGraphVersion($results_pts_version); diff --git a/pts-core/functions/pts-interfaces.php b/pts-core/functions/pts-interfaces.php index 697f41a..a0ff772 100644 --- a/pts-core/functions/pts-interfaces.php +++ b/pts-core/functions/pts-interfaces.php @@ -162,6 +162,8 @@ define("S_RESULTS_RESULTS_GROUP_IDENTIFIER", "Group/Entry/Identifier"); // From define("P_RESULTS_RESULTS_GROUP_IDENTIFIER", P_RESULTS_RESULTS_GROUP . "/" . S_RESULTS_RESULTS_GROUP_IDENTIFIER); // Full path to the results identifier define("S_RESULTS_RESULTS_GROUP_VALUE", "Group/Entry/Value"); // From inside the XML results group, the results values define("P_RESULTS_RESULTS_GROUP_VALUE", P_RESULTS_RESULTS_GROUP . "/" . S_RESULTS_RESULTS_GROUP_VALUE); // Full path to the results values +define("S_RESULTS_RESULTS_GROUP_RAW", "Group/Entry/RawString"); // From inside the XML results group, the results raw string +define("P_RESULTS_RESULTS_GROUP_RAW", P_RESULTS_RESULTS_GROUP . "/" . S_RESULTS_RESULTS_GROUP_RAW); // Full path to the results raw string // // USER CONFIGURATION SPECIFICATION diff --git a/pts-core/objects/pts_test_result.php b/pts-core/objects/pts_test_result.php index 8d9619a..adcc3b9 100644 --- a/pts-core/objects/pts_test_result.php +++ b/pts-core/objects/pts_test_result.php @@ -81,6 +81,14 @@ class pts_test_result { return $this->result_proportion; } + public function get_trial_results() + { + return $this->trial_results; + } + public function get_trial_results_string() + { + return implode(":", $this->get_trial_results()); + } public function get_attribute($name) { if(isset($this->attributes[$name]) && !empty($this->attributes[$name])) @@ -90,6 +98,8 @@ class pts_test_result } public function add_trial_run_result($result) { + $result = trim($result); + if(!empty($result)) { array_push($this->trial_results, $result); |