2017 © Pedro Peláez
 

library phprofiler

A simple profiler for php without a need for any external dependencies

image

ngranko/phprofiler

A simple profiler for php without a need for any external dependencies

  • Saturday, May 13, 2017
  • by ngranko
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

PHProfiler

A simple library for doing profiling without a need for thousands of external dependencies., (*1)

Build Status Code Climate, (*2)

Installation

The simplest way to install it is to use Composer:, (*3)

composer require ngranko/phprofiler

Or you can move the contents of this repository to a folder of your liking and then have a lot of fun making the autoloading work, etc., (*4)

Usage

Initialization

To use the library simply create a new PHProfiler object:, (*5)

<?php
$profiler = new PHProfiler();

This will initialize the profiler and set current time and memory consumption values as reference to calculate relative time and memory usage against., (*6)

Capturing a point

To capture a point, do:, (*7)

<?php
$profiler = new PHProfiler();
$profiler->rememberPoint();

This will capture a current state of the system: time elapsed and memory usage., (*8)

Exporting results

Depending on a type of export you want to do, do one of those:, (*9)

<?php
$profiler = new PHProfiler();
$profiler->rememberPoint();
$profiler->export(ExporterType::LOG);

The first, required, argument to the export() function is a type of export you want to do. Use ExporterType constants to specify it and see which types are available., (*10)

By default, a file will be created in your current working directory, named profiler_output_[timestamp].[extension]. If you want to save result to some other place, simply specify a desired path (with a filename) as a second argument to the export() function., (*11)

The Versions

13/05 2017

dev-master

9999999-dev

A simple profiler for php without a need for any external dependencies

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Nikita Granko

php profiler

13/05 2017

1.0

1.0.0.0

A simple profiler for php without a need for any external dependencies

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Nikita Granko

php profiler

09/05 2017

0.9

0.9.0.0

A simple profiler for php without a need for any external dependencies

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Nikita Granko

php profiler

21/01 2017

0.8

0.8.0.0

A simple profiler for php without a need for any external dependencies

  Sources   Download

MIT

The Requires

  • php 5.6.* || ^7.0

 

The Development Requires

by Nikita Granko

php profiler

19/10 2016

0.7

0.7.0.0

A simple profiler for php without a need for any external dependencies

  Sources   Download

MIT

The Requires

  • php 5.6.* || ^7.0

 

The Development Requires

by Nikita Granko

php profiler

18/10 2016

0.6

0.6.0.0

A simple profiler for php without a need for any external dependencies

  Sources   Download

MIT

The Requires

  • php 5.6.* || ^7.0

 

The Development Requires

by Nikita Granko

php profiler

13/09 2016

0.5

0.5.0.0

A simple profiler for php without a need for any external dependencies

  Sources   Download

MIT

The Development Requires

by Nikita Granko

php profiler