2017 © Pedro PelΓ‘ez
 

project screwdrivers

Small PHP library for benchmarking.

image

mudasobwa/screwdrivers

Small PHP library for benchmarking.

  • Friday, April 4, 2014
  • by mudasobwa
  • Repository
  • 1 Watchers
  • 3 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

To ease the PHP development, (*1)

Installation

$ vim composer.json
{
  "require": {
    "mudasobwa/screwdrivers": "0.1.*"
  }
}
$ curl http://getcomposer.org/installer | php
$ php composer.phar install --prefer-source

YardStick

YardStick is a class, providing easy access to benchmarking., (*2)

It allows the embedded-in-code becnhmarks, such as:, (*3)

…
$ys = new \Mudasobwa\Screwdrivers\YardStick(true);
$ys->milestone('YS1#Start');
$my_obj->perform_long_operation($param1, $param2);
$ys->milestone('YS2');
$my_obj->perform_long_operation($param3, $param4);
$ys->milestone('YS1#Finish');
$ys->report('YS.+'); // report measures for milestones `YS*`

The output will be looking like:, (*4)

==== Results for tag: [1396189882.6664-YS1#Start]
--   ⌚ Time     β‡’ 03/30/14 14:31:22
--   βŒ› Memory:  β‡’ 6915KB
--   Peak (1m): β‡’ 7075KB
--   Load:      β‡’ 0.82
==== Diff for tags: [1396189882.6664 :: 1396189882.6989]
--   ⌚ Time:    β‡’ 0.032443 sec
--   βŒ› Memory:  β‡’ 7.0 KB
==== Diff for tags: [1396189882.6989 :: 1396189882.98]
--   ⌚ Time:    β‡’ 0.281102 sec
--   βŒ› Memory:  β‡’ 5.9 KB
β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”
==== Diff for tags: [1396189882.6664 :: 1396189882.98]
--   ⌚ Time:    β‡’ 0.313545 sec
--   βŒ› Memory:  β‡’ 12.9 KB

Another way is to measure the specific methods (and/or compare them):, (*5)

\Mudasobwa\Screwdrivers\YardStick::benchmark(
   new FlexibleString('Hello, world!'), 'replace', array('/l/', 'L')
);

The Versions

04/04 2014

dev-master

9999999-dev http://rocket-science.ru

Small PHP library for benchmarking.

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

30/03 2014

0.1.2

0.1.2.0 http://rocket-science.ru

Small PHP library for benchmarking.

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

30/03 2014

0.1.1

0.1.1.0 http://rocket-science.ru

Small PHP library for benchmarking.

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires

30/03 2014

0.1

0.1.0.0 http://rocket-science.ru

Small PHP library for benchmarking.

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

The Development Requires