Download the PHP package geekality/timer without Composer

On this page you can find all versions of the php package geekality/timer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package timer

Introduction

Simple class for logging time and memory usage of methods and such.

The Timer::__toString() method will create a simple plain text overview, but you can of course also create your own output by using the properties of the Timer objects directly.

Installation

If you use Composer, which I highly recommend, simply add the following dependency to your composer.json:

    "require":
    {
        "geekality/timer": "1.*"
    },

Otherwise just download the file Timer.php from here and include it in your project. It's self-contained so you only need this one file.

Example usage

Timer::start('root');
// Stuff
Timer::start('section');
// Sub section stuff
Timer::stop();
// More stuff
echo Timer::result();

Here is some sample output from the sample/add.php script in this repo.

/TimerPHP/sample/add.php(3, 9)
 │ 
 │ 7.001 s
 │ 4.02 KiB, 732.41 KiB
 │ 
 ├ SlowMath::slowAdd(3, 9)
 │  │ 
 │  │ 4.001 s
 │  │ 432.00 B, 732.41 KiB
 │ ─┘ 
 │ 
 ├ test(null, true, false)
 │  │ 
 │  │ 2.000 s
 │  │ 176.00 B, 732.41 KiB
 │ ─┘ 

If you want to see some more extensive use of this class, you can check out my project, Svish/MyHymnal. There I also dump the result to a file which you can load on the website by clicking a tiny Debug link in the bottom right corner.

License

This work is licensed under the Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit Creative Commons Attribution 3.0 Unported License.

Creative Commons License


All versions of timer with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package geekality/timer contains the following files

Loading the files please wait ....