2017 © Pedro PelĂĄez
 

library minitimer

Simplest way to profile execution time in PHP

image

mrmanchot/minitimer

Simplest way to profile execution time in PHP

  • Saturday, February 18, 2017
  • by MrManchot
  • Repository
  • 1 Watchers
  • 1 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 13 % Grown

The README.md

MiniTimer

MiniTimer is a lightweight PHP library designed to facilitate tracking and displaying the execution time of different parts of your code. It is particularly useful for debugging and performance optimization by measuring the execution time of specific code blocks., (*1)

Features

  • Measures the execution time of specific tasks within your application.
  • Supports task hierarchy for detailed analysis.
  • Displays results in an easy-to-read format.
  • Implements the Singleton pattern for easy use and global access.

Installation

Copy the MiniTimer.php file into your project and include it in your PHP scripts where you wish to use MiniTimer., (*2)

Usage

Here's how you can use MiniTimer in your project:, (*3)

Starting and Stopping a Timer

To measure the execution time of a part of your code, surround it with the start and stop methods:, (*4)

require_once 'MiniTimer.php';

// Start the timer
MiniTimer::inst()->start('YourTaskName');

// Your code here

// Stop the timer
MiniTimer::inst()->stop('YourTaskName');

Displaying the Results

To display the results of the measurements:, (*5)

MiniTimer::inst()->display();

The Versions

18/02 2017

dev-master

9999999-dev

Simplest way to profile execution time in PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Cédric Mouleyre

profile php performance debugging profiler

18/02 2017

1.0.0

1.0.0.0

Simplest way to profile execution time in PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Cédric Mouleyre

profile php performance debugging profiler