當前位置: 首頁>>代碼示例>>PHP>>正文


PHP pts_client::display_web_page方法代碼示例

本文整理匯總了PHP中pts_client::display_web_page方法的典型用法代碼示例。如果您正苦於以下問題:PHP pts_client::display_web_page方法的具體用法?PHP pts_client::display_web_page怎麽用?PHP pts_client::display_web_page使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pts_client的用法示例。


在下文中一共展示了pts_client::display_web_page方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: run

 public static function run($args)
 {
     $result_file = new pts_result_file($args[0]);
     $result_file_identifiers = $result_file->get_system_identifiers();
     if (count($result_file_identifiers) < 2) {
         echo PHP_EOL . 'There are not multiple test runs in this result file.' . PHP_EOL;
         return false;
     }
     echo PHP_EOL . 'Enter The New Order To Display The New Results, From Left To Right.' . PHP_EOL;
     $sorted_identifiers = array();
     do {
         $extract_identifier = pts_user_io::prompt_text_menu('Select the test run to be showed next', $result_file_identifiers);
         $sorted_identifiers[] = $extract_identifier;
         $old_identifiers = $result_file_identifiers;
         $result_file_identifiers = array();
         foreach ($old_identifiers as $identifier) {
             if ($identifier != $extract_identifier) {
                 $result_file_identifiers[] = $identifier;
             }
         }
     } while (count($result_file_identifiers) > 0);
     $result_file->reorder_runs($sorted_identifiers);
     pts_client::save_test_result($result_file->get_file_location(), $result_file->get_xml());
     pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . $args[0] . '/index.html');
 }
開發者ID:pacificIT,項目名稱:phoronix-test-suite,代碼行數:25,代碼來源:reorder_result_file.php

示例2: run

 public static function run($r)
 {
     $result = $r[0];
     $result_file = new pts_result_file($result);
     $result_file_identifiers = $result_file->get_system_identifiers();
     if (count($result_file_identifiers) < 2) {
         echo PHP_EOL . 'There are not multiple test runs in this result file.' . PHP_EOL;
         return false;
     }
     $remove_identifiers = explode(',', pts_user_io::prompt_text_menu('Select the test run(s) to remove', $result_file_identifiers, true));
     $keep_identifiers = array();
     foreach ($result_file_identifiers as $identifier) {
         if (!in_array($identifier, $remove_identifiers)) {
             array_push($keep_identifiers, $identifier);
         }
     }
     foreach (array('test-logs', 'system-logs', 'installation-logs') as $dir_name) {
         foreach ($remove_identifiers as $remove_identifier) {
             if (is_dir(PTS_SAVE_RESULTS_PATH . $r[0] . '/' . $dir_name . '/' . $remove_identifier)) {
                 pts_file_io::delete(PTS_SAVE_RESULTS_PATH . $r[0] . '/' . $dir_name . '/' . $remove_identifier, null, true);
             }
         }
     }
     $extract_select = new pts_result_merge_select($result, $keep_identifiers);
     $extract_result = pts_merge::merge_test_results($extract_select);
     pts_client::save_test_result($r[0] . '/composite.xml', $extract_result);
     pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . $r[0] . '/index.html');
 }
開發者ID:pchiruma,項目名稱:phoronix-test-suite,代碼行數:28,代碼來源:remove_from_result_file.php

示例3: run

 public static function run($args)
 {
     $result = $args[0];
     $result_file = new pts_result_file($result);
     $result_file_identifiers = $result_file->get_system_identifiers();
     if (count($result_file_identifiers) < 2) {
         echo PHP_EOL . 'There are not multiple test runs in this result file.' . PHP_EOL;
         return false;
     }
     $extract_selects = array();
     echo PHP_EOL . 'Enter The New Order To Display The New Results, From Left To Right.' . PHP_EOL;
     do {
         $extract_identifier = pts_user_io::prompt_text_menu('Select the test run to be showed next', $result_file_identifiers);
         array_push($extract_selects, new pts_result_merge_select($result, $extract_identifier));
         $old_identifiers = $result_file_identifiers;
         $result_file_identifiers = array();
         foreach ($old_identifiers as $identifier) {
             if ($identifier != $extract_identifier) {
                 array_push($result_file_identifiers, $identifier);
             }
         }
     } while (count($result_file_identifiers) > 0);
     $ordered_result = pts_merge::merge_test_results_array($extract_selects);
     pts_client::save_test_result($args[0] . '/composite.xml', $ordered_result);
     pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . $args[0] . '/index.html');
 }
開發者ID:pchiruma,項目名稱:phoronix-test-suite,代碼行數:26,代碼來源:reorder_result_file.php

示例4: run

 public static function run($r)
 {
     $URL = PTS_SAVE_RESULTS_PATH . $r[0];
     if (!is_dir($URL . '/result-graphs/')) {
         pts_client::generate_result_file_graphs($r[0], PTS_SAVE_RESULTS_PATH . $r[0] . '/');
     }
     pts_client::display_web_page($URL . '/index.html', null, false, true);
 }
開發者ID:ShaolongHu,項目名稱:phoronix-test-suite,代碼行數:8,代碼來源:show_result.php

示例5: run

 public static function run($r)
 {
     $result_file = pts_types::identifier_to_object($r[0]);
     $upload_url = pts_openbenchmarking::upload_test_result($result_file);
     if ($upload_url) {
         pts_client::display_web_page($upload_url, 'Do you want to view the results on OpenBenchmarking.org', true);
     } else {
         echo PHP_EOL . 'Results Failed To Upload.' . PHP_EOL;
     }
 }
開發者ID:ptzafrir,項目名稱:phoronix-test-suite,代碼行數:10,代碼來源:upload_result.php

示例6: run

 public static function run($args)
 {
     $base_file = $args[0];
     do {
         $rand_file = rand(1000, 9999);
         $save_to = 'analyze-' . $rand_file . '/';
     } while (is_dir(PTS_SAVE_RESULTS_PATH . $save_to));
     $save_to .= 'composite.xml';
     // Analyze Results
     $SAVED_RESULTS = pts_merge::generate_analytical_batch_xml($base_file);
     pts_client::save_test_result($save_to, $SAVED_RESULTS);
     echo 'Results Saved To: ' . PTS_SAVE_RESULTS_PATH . $save_to . PHP_EOL . PHP_EOL;
     pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . dirname($save_to) . '/index.html');
 }
開發者ID:pchiruma,項目名稱:phoronix-test-suite,代碼行數:14,代碼來源:analyze_batch.php

示例7: run

 public static function run($r)
 {
     $result = $r[0];
     if (is_dir(PTS_SAVE_RESULTS_PATH . $result)) {
         do {
             $new_result_name = pts_user_io::prompt_user_input('Enter a new result file name for ' . $result);
             $clean_result_name = pts_test_run_manager::clean_save_name($new_result_name, true);
         } while ($clean_result_name == null || is_dir(PTS_SAVE_RESULTS_PATH . $clean_result_name));
     }
     if (rename(PTS_SAVE_RESULTS_PATH . $result, PTS_SAVE_RESULTS_PATH . $clean_result_name)) {
         echo PHP_EOL . 'Renamed ' . $result . ' to ' . $clean_result_name . '.' . PHP_EOL . PHP_EOL;
     }
     pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . $clean_result_name . '/index.html');
 }
開發者ID:ShaolongHu,項目名稱:phoronix-test-suite,代碼行數:14,代碼來源:rename_result_file.php

示例8: run

 public static function run($args)
 {
     $result_file = new pts_result_file($args[0]);
     $result_file_identifiers = $result_file->get_system_identifiers();
     if (count($result_file_identifiers) < 2) {
         echo PHP_EOL . 'There are not multiple test runs in this result file.' . PHP_EOL;
         return false;
     }
     $extract_selects = array();
     echo PHP_EOL . 'Automatically sorting the results...' . PHP_EOL;
     sort($result_file_identifiers);
     $result_file->reorder_runs($result_file_identifiers);
     pts_client::save_test_result($result_file->get_file_location(), $result_file->get_xml());
     pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . $args[0] . '/index.html');
 }
開發者ID:ShaolongHu,項目名稱:phoronix-test-suite,代碼行數:15,代碼來源:auto_sort_result_file.php

示例9: run

 public static function run($r)
 {
     $result = $r[0];
     $result_file = new pts_result_file($result);
     $result_file_identifiers = $result_file->get_system_identifiers();
     $rename_identifier = pts_user_io::prompt_text_menu('Select the test run to rename', $result_file_identifiers);
     $rename_identifier_new = pts_user_io::prompt_user_input('Enter the new identifier');
     foreach (array('test-logs', 'system-logs', 'installation-logs') as $dir_name) {
         if (is_dir(PTS_SAVE_RESULTS_PATH . $r[0] . '/' . $dir_name . '/' . $rename_identifier)) {
             rename(PTS_SAVE_RESULTS_PATH . $r[0] . '/' . $dir_name . '/' . $rename_identifier, PTS_SAVE_RESULTS_PATH . $r[0] . '/' . $dir_name . '/' . $rename_identifier_new);
         }
     }
     $result_file->rename_run($rename_identifier, $rename_identifier_new);
     pts_client::save_test_result($result_file->get_file_location(), $result_file->get_xml());
     pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . $r[0] . '/index.html');
 }
開發者ID:ShaolongHu,項目名稱:phoronix-test-suite,代碼行數:16,代碼來源:rename_identifier_in_result_file.php

示例10: run

 public static function run($r)
 {
     $result_file = new pts_result_file($r[0]);
     $result_title = $result_file->get_title();
     echo PHP_EOL . 'Current Result Title: ' . $result_title . PHP_EOL;
     $new_title = pts_user_io::prompt_user_input('Enter New Title');
     if (!empty($new_title)) {
         $result_file->set_title($new_title);
     }
     $result_description = $result_file->get_description();
     echo PHP_EOL . 'Current Result Description: ' . $result_description . PHP_EOL;
     $new_description = pts_user_io::prompt_user_input('Enter New Description');
     if (!empty($new_description)) {
         $result_file->set_description($new_description);
     }
     pts_client::save_test_result($result_file->get_file_location(), $result_file->get_xml());
     pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . $r[0] . '/index.html');
 }
開發者ID:ptzafrir,項目名稱:phoronix-test-suite,代碼行數:18,代碼來源:edit_result_file.php

示例11: run

 public static function run($args)
 {
     $result = $args[0];
     $result_file = new pts_result_file($result);
     $result_file_identifiers = $result_file->get_system_identifiers();
     if (count($result_file_identifiers) < 2) {
         echo PHP_EOL . 'There are not multiple test runs in this result file.' . PHP_EOL;
         return false;
     }
     $extract_selects = array();
     echo PHP_EOL . 'Automatically sorting the results...' . PHP_EOL;
     sort($result_file_identifiers);
     foreach ($result_file_identifiers as $identifier) {
         array_push($extract_selects, new pts_result_merge_select($result, $identifier));
     }
     $ordered_result = pts_merge::merge_test_results_array($extract_selects);
     pts_client::save_test_result($args[0] . '/composite.xml', $ordered_result);
     pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . $args[0] . '/index.html');
 }
開發者ID:pchiruma,項目名稱:phoronix-test-suite,代碼行數:19,代碼來源:auto_sort_result_file.php

示例12: run

 public static function run($args)
 {
     $result_file = new pts_result_file($args[0]);
     $result_file_identifiers = $result_file->get_system_identifiers();
     if (count($result_file_identifiers) < 2) {
         echo PHP_EOL . 'There are not multiple test runs in this result file.' . PHP_EOL;
         return false;
     }
     $extract_identifiers = pts_strings::comma_explode(pts_user_io::prompt_text_menu('Select the test run(s) to extract', $result_file_identifiers, true));
     $remove_identifiers = array_diff($result_file_identifiers, $extract_identifiers);
     $result_file->remove_run($remove_identifiers);
     do {
         echo PHP_EOL . 'Enter new result file to extract to: ';
         $extract_to = pts_user_io::read_user_input();
         $extract_to = pts_test_run_manager::clean_save_name($extract_to);
     } while (empty($extract_to));
     pts_client::save_test_result($extract_to . '/composite.xml', $result_file->get_xml());
     pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . $extract_to . '/index.html');
 }
開發者ID:ShaolongHu,項目名稱:phoronix-test-suite,代碼行數:19,代碼來源:extract_from_result_file.php

示例13: run

 public static function run($r)
 {
     $result_file = new pts_result_file($r[0]);
     $result_file_identifiers = $result_file->get_system_identifiers();
     if (count($result_file_identifiers) < 2) {
         echo PHP_EOL . 'There are not multiple test runs in this result file.' . PHP_EOL;
         return false;
     }
     $remove_identifiers = explode(',', pts_user_io::prompt_text_menu('Select the test run(s) to remove', $result_file_identifiers, true));
     $result_file->remove_run($remove_identifiers);
     $result_dir = dirname($result_file->get_file_location()) . '/';
     foreach (array('test-logs', 'system-logs', 'installation-logs') as $dir_name) {
         foreach ($remove_identifiers as $remove_identifier) {
             if (is_dir($result_dir . $dir_name . '/' . $remove_identifier)) {
                 pts_file_io::delete($result_dir . $dir_name . '/' . $remove_identifier, null, true);
             }
         }
     }
     pts_client::save_test_result($result_file->get_file_location(), $result_file->get_xml());
     pts_client::display_web_page($result_dir . '/index.html');
 }
開發者ID:rkingsbury,項目名稱:phoronix-test-suite,代碼行數:21,代碼來源:remove_from_result_file.php

示例14: run

 public static function run($r)
 {
     $result_file = new pts_result_file($r[0]);
     $result_title = $result_file->get_title();
     echo PHP_EOL . 'Current Result Title: ' . $result_title . PHP_EOL;
     $new_title = pts_user_io::prompt_user_input('Enter New Title');
     if (!empty($new_title)) {
         $result_title = $new_title;
     }
     $result_description = $result_file->get_description();
     echo PHP_EOL . 'Current Result Description: ' . $result_description . PHP_EOL;
     $new_description = pts_user_io::prompt_user_input('Enter New Description');
     if (!empty($new_description)) {
         $result_description = $new_description;
     }
     $result_file_writer = new pts_result_file_writer();
     $result_file_writer->add_result_file_meta_data($result_file, null, $new_title, $new_description);
     $result_file_writer->add_system_information_from_result_file($result_file);
     $result_file_writer->add_results_from_result_file($result_file);
     pts_client::save_test_result($r[0] . '/composite.xml', $result_file_writer->get_xml());
     pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . $r[0] . '/index.html');
 }
開發者ID:pchiruma,項目名稱:phoronix-test-suite,代碼行數:22,代碼來源:edit_result_file.php

示例15: run

 public static function run($r)
 {
     $result_files_to_merge = array();
     foreach ($r as $result_file) {
         if (pts_types::is_result_file($result_file)) {
             array_push($result_files_to_merge, $result_file);
         }
     }
     if (count($result_files_to_merge) < 2) {
         echo PHP_EOL . 'At least two saved result names must be supplied.';
         return false;
     }
     do {
         $rand_file = rand(1000, 9999);
         $merge_to_file = 'merge-' . $rand_file . '/';
     } while (is_dir(PTS_SAVE_RESULTS_PATH . $merge_to_file));
     $merge_to_file .= 'composite.xml';
     // Merge Results
     $merged_results = call_user_func(array('pts_merge', 'merge_test_results_array'), $result_files_to_merge);
     pts_client::save_test_result($merge_to_file, $merged_results);
     echo 'Merged Results Saved To: ' . PTS_SAVE_RESULTS_PATH . $merge_to_file . PHP_EOL . PHP_EOL;
     pts_client::display_web_page(PTS_SAVE_RESULTS_PATH . dirname($merge_to_file) . '/index.html');
 }
開發者ID:pchiruma,項目名稱:phoronix-test-suite,代碼行數:23,代碼來源:merge_results.php


注:本文中的pts_client::display_web_page方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。