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


PHP pts_openbenchmarking::openbenchmarking_host方法代碼示例

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


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

示例1: upload_usage_data

 public static function upload_usage_data($task, $data)
 {
     if (!pts_network::internet_support_available()) {
         return false;
     }
     switch ($task) {
         case 'test_install':
             list($test_install, $time_elapsed) = $data;
             $upload_data = array('test_identifier' => $test_install->test_profile->get_identifier(), 'test_version' => $test_install->test_profile->get_test_profile_version(), 'elapsed_time' => $time_elapsed);
             pts_network::http_upload_via_post(pts_openbenchmarking::openbenchmarking_host() . 'extern/statistics/report-test-install.php', $upload_data);
             break;
         case 'test_complete':
             list($test_result, $time_elapsed) = $data;
             $upload_data = array('test_identifier' => $test_result->test_profile->get_identifier(), 'test_version' => $test_result->test_profile->get_test_profile_version(), 'elapsed_time' => $time_elapsed);
             pts_network::http_upload_via_post(pts_openbenchmarking::openbenchmarking_host() . 'extern/statistics/report-test-completion.php', $upload_data);
             break;
         case 'test_install_failure':
             list($test_install, $error) = $data;
             $upload_data = array('test_identifier' => $test_install->test_profile->get_identifier(), 'error' => $error, 'os' => phodevi::read_property('system', 'vendor-identifier'));
             pts_network::http_upload_via_post(pts_openbenchmarking::openbenchmarking_host() . 'extern/statistics/report-test-install-failure.php', $upload_data);
             break;
     }
 }
開發者ID:pchiruma,項目名稱:phoronix-test-suite,代碼行數:23,代碼來源:pts_openbenchmarking_client.php

示例2: make_openbenchmarking_request

 public static function make_openbenchmarking_request($request, $post = array())
 {
     $url = pts_openbenchmarking::openbenchmarking_host() . 'f/client.php';
     $to_post = array_merge(array('r' => $request, 'client_version' => PTS_CORE_VERSION, 'gsid' => defined('PTS_GSID') ? PTS_GSID : null, 'gsid_e' => defined('PTS_GSID_E') ? PTS_GSID_E : null), $post);
     if (PTS_IS_CLIENT && ($account = pts_openbenchmarking_client::get_openbenchmarking_account()) && is_array($account)) {
         $to_post = array_merge($to_post, $account);
     }
     return pts_network::http_upload_via_post($url, $to_post);
 }
開發者ID:pchiruma,項目名稱:phoronix-test-suite,代碼行數:9,代碼來源:pts_openbenchmarking.php


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