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


PHP pts_openbenchmarking::linked_repositories方法代码示例

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


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

示例1: run

 public static function run($r)
 {
     echo PHP_EOL . 'OpenBenchmarking.org Repositories:' . PHP_EOL . PHP_EOL;
     foreach (pts_openbenchmarking::linked_repositories() as $repo) {
         if ($repo == 'local') {
             // Skip local since it's a fake repository
             continue;
         }
         $repo_index = pts_openbenchmarking::read_repository_index($repo);
         $generated_time = date('F d H:i', $repo_index['main']['generated']);
         $tab = '    ';
         foreach (array('tests', 'suites') as $t) {
             echo PHP_EOL . str_repeat('=', 40) . PHP_EOL . strtoupper($repo . ' ' . $t) . PHP_EOL . 'Generated: ' . $generated_time . PHP_EOL . str_repeat('=', 40) . PHP_EOL . PHP_EOL;
             foreach ($repo_index[$t] as $identifier => $test) {
                 echo 'Identifier: ' . $identifier . PHP_EOL;
                 foreach ($test as $i => $j) {
                     echo sprintf('%-22ls', $i) . ': ';
                     if (is_array($j)) {
                         echo implode(', ', $j);
                     } else {
                         echo $j;
                     }
                     echo PHP_EOL;
                 }
                 echo PHP_EOL;
             }
         }
     }
 }
开发者ID:ShaolongHu,项目名称:phoronix-test-suite,代码行数:29,代码来源:dump_openbenchmarking_indexes.php

示例2: available_virtual_suites

 public static function available_virtual_suites()
 {
     $virtual_suites = array();
     $possible_identifiers = array_merge(array('all', 'installed'), array_map('strtolower', self::available_operating_systems()), array_map('strtolower', pts_types::subsystem_targets()), array_map('strtolower', pts_types::test_profile_software_types()));
     foreach (pts_openbenchmarking::linked_repositories() as $repo) {
         $repo_identifiers = array_merge($possible_identifiers, self::tags_in_repo($repo));
         foreach ($repo_identifiers as $id) {
             $virt_suite = $repo . '/' . $id;
             if (self::is_virtual_suite($virt_suite)) {
                 $virtual_suite = pts_types::identifier_to_object($virt_suite);
                 if ($virtual_suite instanceof pts_virtual_test_suite) {
                     array_push($virtual_suites, $virtual_suite);
                 }
             }
         }
     }
     return $virtual_suites;
 }
开发者ID:ShaolongHu,项目名称:phoronix-test-suite,代码行数:18,代码来源:pts_virtual_test_suite.php

示例3: run

 public static function run($r)
 {
     echo PHP_EOL . 'Linked OpenBenchmarking.org Repositories:' . PHP_EOL . PHP_EOL;
     foreach (pts_openbenchmarking::linked_repositories() as $repo) {
         if ($repo == 'local') {
             // Skip local since it's a fake repository
             continue;
         }
         $repo_index = pts_openbenchmarking::read_repository_index($repo);
         $test_count = count($repo_index['tests']);
         $suite_count = count($repo_index['suites']);
         $generated_time = date('F d H:i', $repo_index['main']['generated']);
         echo sprintf('    REPO: %-20ls WEB: %-35ls' . PHP_EOL, $repo, 'http://openbenchmarking.org/user/' . $repo);
         echo sprintf('        LAST GENERATED:  %-3ls' . PHP_EOL, $generated_time);
         echo sprintf('        TEST COUNT:      %-3ls    SUITE COUNT: %-3ls' . PHP_EOL, $test_count, $suite_count);
         echo PHP_EOL;
     }
 }
开发者ID:ShaolongHu,项目名称:phoronix-test-suite,代码行数:18,代码来源:openbenchmarking_repositories.php

示例4: run

 public static function run($r)
 {
     pts_client::$display->generic_heading('Recently Updated OpenBenchmarking.org Tests');
     $recently_updated = array();
     foreach (pts_openbenchmarking::linked_repositories() as $repo) {
         if ($repo == 'local') {
             // Skip local since it's a fake repository
             continue;
         }
         $repo_index = pts_openbenchmarking::read_repository_index($repo);
         $changes[$repo] = pts_openbenchmarking_client::fetch_repository_changelog($repo);
         if (isset($repo_index['tests']) && is_array($repo_index['tests'])) {
             foreach (array_keys($repo_index['tests']) as $identifier) {
                 if ($repo_index['tests'][$identifier]['last_updated'] > time() - 90 * 86400) {
                     $recently_updated[$repo . '/' . $identifier] = $repo_index['tests'][$identifier];
                 }
             }
         }
     }
     if (count($recently_updated) > 0) {
         // sort by date
         uasort($recently_updated, array('openbenchmarking_changes', 'compare_time_stamps'));
         // so that tests are shown from newest to oldest
         $recently_updated = array_reverse($recently_updated);
         $longest_identifier_length = array_keys($recently_updated);
         $longest_identifier_length = strlen(pts_strings::find_longest_string($longest_identifier_length)) + 1;
         foreach ($recently_updated as $test_profile => $repo_data) {
             echo sprintf('%-' . $longest_identifier_length . 'ls - %-35ls', $test_profile, $repo_data['title']) . PHP_EOL;
             $br = explode('/', $test_profile);
             if (isset($changes[$br[0]]['tests'][$br[1]]['changes'])) {
                 foreach ($changes[$br[0]]['tests'][$br[1]]['changes'] as $test_profile_version => $data) {
                     echo 'v' . $test_profile_version . ' [' . date('d M Y', $data['last_updated']) . ']' . PHP_EOL;
                     echo '  - ' . $data['commit_description'] . PHP_EOL;
                 }
             } else {
                 echo 'Last Updated: ' . date('d F Y', $repo_data['last_updated']) . PHP_EOL;
             }
             echo PHP_EOL;
             // $repo_data['test_type']
         }
     } else {
         echo PHP_EOL . 'No updated tests were found.' . PHP_EOL;
     }
 }
开发者ID:ShaolongHu,项目名称:phoronix-test-suite,代码行数:44,代码来源:openbenchmarking_changes.php

示例5: tests_available

 public static function tests_available()
 {
     $test_count = 0;
     foreach (pts_openbenchmarking::linked_repositories() as $repo) {
         $repo_index = pts_openbenchmarking::read_repository_index($repo);
         if (isset($repo_index['tests']) && is_array($repo_index['tests'])) {
             $test_count += count($repo_index['tests']);
         }
     }
     return $test_count;
 }
开发者ID:pchiruma,项目名称:phoronix-test-suite,代码行数:11,代码来源:pts_openbenchmarking_client.php

示例6: invalid_command_helper

 public static function invalid_command_helper($passed_args)
 {
     $showed_recent_results = self::recently_saved_results();
     if (!empty($passed_args)) {
         $arg_soundex = soundex($passed_args);
         $similar_tests = array();
         foreach (pts_openbenchmarking::linked_repositories() as $repo) {
             $repo_index = pts_openbenchmarking::read_repository_index($repo);
             foreach (array('tests', 'suites') as $type) {
                 if (isset($repo_index[$type]) && is_array($repo_index[$type])) {
                     foreach (array_keys($repo_index[$type]) as $identifier) {
                         if (soundex($identifier) == $arg_soundex) {
                             array_push($similar_tests, array('- ' . $repo . '/' . $identifier, ' [' . ucwords(substr($type, 0, -1)) . ']'));
                         }
                     }
                 }
             }
         }
         foreach (pts_client::saved_test_results() as $result) {
             if (soundex($result) == $arg_soundex) {
                 array_push($similar_tests, array('- ' . $result, ' [Test Result]'));
             }
         }
         if (count($similar_tests) > 0) {
             echo 'Possible Suggestions:' . PHP_EOL;
             if (isset($similar_tests[12])) {
                 // lots of tests... trim it down
                 $similar_tests = array_rand($similar_tests, 12);
             }
             echo pts_user_io::display_text_table($similar_tests) . PHP_EOL . PHP_EOL;
         }
     }
     if ($showed_recent_results == false) {
         echo 'See available tests to run by visiting OpenBenchmarking.org or running:' . PHP_EOL . PHP_EOL;
         echo '    phoronix-test-suite list-tests' . PHP_EOL . PHP_EOL;
         echo 'Tests can be installed by running:' . PHP_EOL . PHP_EOL;
         echo '    phoronix-test-suite install <test-name>' . PHP_EOL;
     }
 }
开发者ID:ptzafrir,项目名称:phoronix-test-suite,代码行数:39,代码来源:pts_tests.php


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