1<?php 2 3/* 4 Phoronix Test Suite 5 URLs: http://www.phoronix.com, http://www.phoronix-test-suite.com/ 6 Copyright (C) 2011, Phoronix Media 7 Copyright (C) 2011, Michael Larabel 8 9 This program is free software; you can redistribute it and/or modify 10 it under the terms of the GNU General Public License as published by 11 the Free Software Foundation; either version 3 of the License, or 12 (at your option) any later version. 13 14 This program is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 GNU General Public License for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with this program. If not, see <http://www.gnu.org/licenses/>. 21*/ 22 23class openbenchmarking_repositories implements pts_option_interface 24{ 25 const doc_section = 'OpenBenchmarking.org'; 26 const doc_description = 'This option will list the OpenBenchmarking.org repositories currently linked to this Phoronix Test Suite client instance.'; 27 28 public static function run($r) 29 { 30 echo PHP_EOL . 'Linked OpenBenchmarking.org Repositories:' . PHP_EOL . PHP_EOL; 31 foreach(pts_openbenchmarking::linked_repositories() as $repo) 32 { 33 if($repo == 'local') 34 { 35 // Skip local since it's a fake repository 36 continue; 37 } 38 39 $repo_index = pts_openbenchmarking::read_repository_index($repo); 40 $test_count = count($repo_index['tests']); 41 $suite_count = count($repo_index['suites']); 42 $generated_time = date('F d H:i', $repo_index['main']['generated']); 43 44 echo sprintf(' REPO: %-20ls WEB: %-35ls' . PHP_EOL, $repo, 'http://openbenchmarking.org/user/' . $repo); 45 echo sprintf(' LAST GENERATED: %-3ls' . PHP_EOL, $generated_time); 46 echo sprintf(' TEST COUNT: %-3ls SUITE COUNT: %-3ls' . PHP_EOL, $test_count, $suite_count); 47 echo PHP_EOL; 48 } 49 } 50} 51 52?> 53