当前位置: 首页>>代码示例>>PHP>>正文


PHP pts_openbenchmarking::clone_openbenchmarking_result_system_logs方法代码示例

本文整理汇总了PHP中pts_openbenchmarking::clone_openbenchmarking_result_system_logs方法的典型用法代码示例。如果您正苦于以下问题:PHP pts_openbenchmarking::clone_openbenchmarking_result_system_logs方法的具体用法?PHP pts_openbenchmarking::clone_openbenchmarking_result_system_logs怎么用?PHP pts_openbenchmarking::clone_openbenchmarking_result_system_logs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pts_openbenchmarking的用法示例。


在下文中一共展示了pts_openbenchmarking::clone_openbenchmarking_result_system_logs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: clone_openbenchmarking_result

 public static function clone_openbenchmarking_result(&$id, $return_xml = false)
 {
     if (!pts_network::internet_support_available()) {
         return false;
     }
     $json_response = pts_openbenchmarking::make_openbenchmarking_request('clone_openbenchmarking_result', array('i' => $id));
     $json_response = json_decode($json_response, true);
     $valid = false;
     if (is_array($json_response) && isset($json_response['openbenchmarking']['result']['composite_xml'])) {
         $composite_xml = $json_response['openbenchmarking']['result']['composite_xml'];
         $result_file = new pts_result_file($composite_xml);
         $result_file_writer = new pts_result_file_writer();
         $result_file_writer->add_result_file_meta_data($result_file, $id);
         $result_file_writer->add_system_information_from_result_file($result_file);
         $result_file_writer->add_results_from_result_file($result_file);
         //$id = strtolower($id);
         $valid = $return_xml ? $result_file_writer->get_xml() : pts_client::save_test_result($id . '/composite.xml', $result_file_writer->get_xml(), true);
         if (PTS_IS_CLIENT && $json_response['openbenchmarking']['result']['system_logs_available']) {
             // Fetch the system logs and toss them into the results directory system-logs/
             pts_openbenchmarking::clone_openbenchmarking_result_system_logs($id, pts_client::setup_test_result_directory($id), $json_response['openbenchmarking']['result']['system_logs_available']);
         }
     } else {
         if (PTS_IS_CLIENT && isset($json_response['openbenchmarking']['result']['error'])) {
             trigger_error($json_response['openbenchmarking']['result']['error'], E_USER_ERROR);
         }
     }
     return $valid;
 }
开发者ID:pchiruma,项目名称:phoronix-test-suite,代码行数:28,代码来源:pts_openbenchmarking.php


注:本文中的pts_openbenchmarking::clone_openbenchmarking_result_system_logs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。