- Measure easily the performance of your PHP script across multiple platforms
- Support for Laravel framework » Laravel
- Support interface web, web console and command line
- Export results to class, file or json string
- Print information about PHP version, max exaction time and max memory
- Measure time, memory usage and memory peak
- Switch automatically between interfaces
- Live function » how to use
- Easy to install » instalation
- Clear and active wiki » Wiki
// 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();
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();
Run the performance test for the command line
// Normal
$ php your_script.php
// Or Live version
$ php your_script.php --live
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();
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();