2017 © Pedro Peláez
 

project php-benchmark

A simple class for testing how long code takes to run

image

ko/php-benchmark

A simple class for testing how long code takes to run

  • Wednesday, April 25, 2018
  • by peledies
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 67 % Grown

The README.md

ko-php-benchmark

This module is for benchmarking PHP code to determine how long a particular procedure takes to run., (*1)

Install

composer require ko/php-benchmark

Usage

Class Object

Return the Benchmark class object of how long a procedure took to run., (*2)

  $mark = new \KO\Benchmark\Benchmark();

  sleep(3); // Some task that takes time to run

  echo $mark->calc();

Human Readable String

Return a human readable string of how long a procedure took to run., (*3)

  $mark = new \KO\Benchmark\Benchmark();

  sleep(3); // Some task that takes time to run

  echo $mark->calc()->toString();

Array

Return an Array of how long a procedure took to run., (*4)

  $mark = new \KO\Benchmark\Benchmark();

  sleep(3); // Some task that takes time to run

  var_dump( $mark->calc()->toArray() );

The Versions

25/04 2018

dev-master

9999999-dev

A simple class for testing how long code takes to run

  Sources   Download

MIT

25/04 2018

0.0.1

0.0.1.0

A simple class for testing how long code takes to run

  Sources   Download

MIT