. */ class clone_global_result implements pts_option_interface { public static function run($r) { $identifier = $r[0]; if(is_file(SAVE_RESULTS_DIR . $identifier . "/composite.xml")) { echo "A saved result already exists with the same name.\n\n"; } else { if(pts_is_global_id($identifier)) { pts_save_result($identifier . "/composite.xml", pts_global_download_xml($identifier)); // TODO: re-render the XML file and generate the graphs through that save echo "Result Saved To: " . SAVE_RESULTS_DIR . $identifier . "/composite.xml\n\n"; //pts_display_web_browser(SAVE_RESULTS_DIR . $ARG_1 . "/index.html"); } else { echo $identifier . " is an unrecognized Phoronix Global ID.\n\n"; } } } } ?>