Download the PHP package chus/php-execution-tracker without Composer

On this page you can find all versions of the php package chus/php-execution-tracker. 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 php-execution-tracker

PHP Execution Tracker

A PHP library to track the execution of a process. It allows you to track the time difference between processes, debug, logs, warnings and errors.

Important: Currently, I use this same library in production, but it is still subject to potential significant changes due to the early version it is in.

Usage

Install the library using composer:

Import the library:

Then, you can track the execution of a process like this:

Output:

Result formats

You can get the result in different formats:

Array

JSON

HTML

Result options

You can also get the result with different options:

Reduced

Get the result with a reduced version of the trace. This will remove the elements with false values (empty arrays, empty strings, etc.). Start and end times will be removed if the duration is minor than 1 second.

Output:

With durations

Get the result indicating all traces duration. This will add the duration of each trace to the result.

Output:

With human readable times

Get the result with human readable times. This will convert the timestamps to human readable times.

Output:

Without timestamps

Get the result without timestamps. This will remove the start and end times from the result.

Output:

Hiding traces

There are some cases where you want to hide a trace, for example, when you have a trace that you don't want to show in the result under some conditions.

Disabling the tracker

You can disable and enable the Tracker wethever you want. This will disable the tracking of the process and the creation of sub-traces.

Having this code:

Without disabling the tracker:

Output:

Disabling the tracker:

Output:

Using the hide method

You can also hide a trace using the hide method:

In terms of performance, if you are going to call the "hide" method many times, is better to use Tracker::disable() and Tracker::enable() to disable and enable the tracker, respectively, instead of hiding traces.

Clearing the tracker

You can clear the tracker to remove all the traces and reset it.

Output:

You can also hide a unique trace:

Is better to use Tracker::disable() and Tracker::enable() to disable and enable the tracker, respectively, instead of hiding traces, due to the traces will be still stored in memory.

Tracker static methods

You can use the following static methods to interact with the tracker:

Development

To run the tests, you can use the following command:

License

This library is licensed under the MIT license. See the LICENSE file for more information.


All versions of php-execution-tracker with dependencies

PHP Build Version
Package Version
No informations.
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 chus/php-execution-tracker contains the following files

Loading the files please wait ....