Added PHP/OS info to benchmark output
Added PHP version and architecture and OS version to benchmark output. Change-Id: I018e6bf8bb60f594ac512ef2113e404dd304786a
This commit is contained in:
parent
7556b664c8
commit
2c66553ed3
1 changed files with 8 additions and 3 deletions
|
|
@ -22,7 +22,6 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
* @todo Report PHP version, OS ..
|
||||
* @file
|
||||
* @ingroup Benchmark
|
||||
*/
|
||||
|
|
@ -39,7 +38,7 @@ abstract class Benchmarker extends Maintenance {
|
|||
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->addOption( 'count', "How many time to run a benchmark", false, true );
|
||||
$this->addOption( 'count', "How many times to run a benchmark", false, true );
|
||||
}
|
||||
|
||||
public function bench( array $benchs ) {
|
||||
|
|
@ -76,7 +75,13 @@ abstract class Benchmarker extends Maintenance {
|
|||
}
|
||||
|
||||
public function getFormattedResults() {
|
||||
$ret = '';
|
||||
$ret = sprintf( "Running PHP version %s (%s) on %s %s %s\n\n",
|
||||
phpversion(),
|
||||
php_uname( 'm' ),
|
||||
php_uname( 's' ),
|
||||
php_uname( 'r' ),
|
||||
php_uname( 'v' )
|
||||
);
|
||||
foreach ( $this->results as $res ) {
|
||||
// show function with args
|
||||
$ret .= sprintf( "%s times: function %s(%s) :\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue