Back to directory
bvanhoekelen avatar

performance

⏱ PHP performance tool analyser your script on time, memory usage and db query. Support Laravel and Composer for web, web console and command line interfaces.. Read more below about its uses, features, and usage.

Clone repository

git clone https://github.com/bvanhoekelen/performance.git

519

Stars

39

Forks

21

Watchers

Apache-2.0

License

⏱ PHP Performance tool 🛠

Hex.pm GitHub release Packagist Github issues Travis branch Travis branch Build: Master|Develop

PHP performance tool

Highlight

Easy to use

// Add namespace at the top
use Performance\Performance;

// Set measure point
Performance::point();

//
// Run test code
//

// Finish all tasks and show test results
Performance::results();

See the function overview for more functions.

Web preview

PHP performance tool for web

Command line preview

PHP performance tool for command line

See how to use query logging.

Web console

PHP performance tool with full date review

See how to use query logging.

See how to export data.

See more info over data review.

Functions

Set measuring point with or without label

Performance::point( <optional:label> );

Finish previous measuring point

Performance::finish();

Finish all measuring points and return test results

Performance::results();

See the function overview for more.

Command line

Run the performance test for the command line

// Normal
$ php your_script.php

// Or live version
$ php your_script.php --live 

Backlog & Feedback

If you have any suggestions to improve this performance tool? Please add your feature, bug or improvement to the BACKLOG.dm. Or create a issues.

Installation

Install with Laravel

Get PHP performance tool by running the Composer command in the command line.

 $ composer require bvanhoekelen/performance

Open your file for the performance test.

// Add namespace at the top
use Performance\Performance;

// Set measure point
Performance::point();

//
// Run test code
//

// Finish all tasks and show test results
Performance::results();

Install with Composer

Get PHP performance by running the Composer command in the command line.

 $ composer require bvanhoekelen/performance

Open your file for the performance test.

// Require vender autoload
require_once('../vendor/autoload.php');

// Add namespace at the top
use Performance\Performance;

// Set measure point
Performance::point();

//
// Run test code
//

// Finish all tasks and show test results
Performance::results();

Releases

Feb 21, 2026

Version v2.6.0 is now available

Download .zip

Support Laravel 13.x.

Jul 21, 2020

Version v2.5.1 is now available

Download .zip

Add

Remove ugly windows console error (#20 from MarouaneRag/patch-1)

Mar 31, 2019

Version v2.5.0 is now available

Download .zip

Change

Use protected instead of private Use static instead of self use /** for comments use throw new exception instead of die Require php version 5.6 and higher

Dec 11, 2018

Version v2.4.0 is now available

Download .zip

Add

Config item Config::setClearScreen() to prevent cleaning screen

Oct 5, 2018

Version v2.3.6 is now available

Download .zip

Fix

Add overflow: auto to result box