Skip to content

PHP performance tool support Laravel and Composer for web, web console and command line interfaces. With built in export function to class, json and file.

License

Notifications You must be signed in to change notification settings

nunomaduro/performance

 
 

Repository files navigation

PHP Performance tool

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

PHP performance tool

Highlight

  • 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

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();

Web preview

PHP performance tool for web

Command line preview

PHP performance tool for command line

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();

Command line

Run the performance test for the command line

// Normal
$ php your_script.php

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

Help, docs and links

Instalation

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();

About

PHP performance tool support Laravel and Composer for web, web console and command line interfaces. With built in export function to class, json and file.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 95.1%
  • CSS 4.9%