2017 © Pedro Peláez
 

library phptimer

image

avvertix/phptimer

  • Thursday, December 4, 2014
  • by avvertix
  • Repository
  • 1 Watchers
  • 0 Stars
  • 26 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PhpTimer

An easy to use 100% native PHP library to profile PHP code., (*1)

Original Authors, (*2)

Introduction

A simple class to keep track of the time it takes to run processes in your code., (*3)

Features:, (*4)

  • labeled timers

Installation

With composer

To add this package as a local, per-project dependency to your project, simply add a dependency on avvertix/phptimer to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a dependency on PhpTimer:, (*5)

{
    "require": {
        "avvertix/phptimer": "0.1.x"
    }
}

Without composer

    require_once 'src/PhpTimer.php';

Usage


$timer = new PhpTimer(); $timer->start('cycle'); for ($i = 0; $i < 100000; $i++) { $a *= $i; } $timer->stop('cycle'); for ($i = 0; $i < 10; $i++) { $timer->start("subloop"); for ($j = 0; $j < 1000000; $j++) $a = $i * $j; $timer->stop("subloop"); } var_dump($timer->getAll());

The Versions

04/12 2014

dev-master

9999999-dev https://github.com/avvertix/phptimer

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires

04/12 2014

v0.1.0

0.1.0.0 https://github.com/avvertix/phptimer

  Sources   Download

AGPL-3.0

The Requires

  • php >=5.3.0

 

The Development Requires