Download the PHP package koalamer/tideways-xhprof-free-scheduler without Composer

On this page you can find all versions of the php package koalamer/tideways-xhprof-free-scheduler. 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 tideways-xhprof-free-scheduler

tideways-xhprof-free-scheduler

A small helper class to integrate the free Tideways XHProf Extension edition into your code.

How to Use

Set Up the tideways_xhprof Extension

You can find the source and precompiled packages, as well as installation instructions at github.com/tideways/php-xhprof-extension.

Use the class name in your script

You can have the class autoloaded, but if you want to include the autoloading routine in the measurement, you should include the source file directly and start the profiling before including the autoloader.

Set how often to start profiling

Setting the value X will result in a 1 in X chance for the profiling to start. Setting it to less than 1 rwsults in never starting the profiler. The default value is 0, which means no profiling.

Start the actual profiling

The init() call will use the current value of the starting chance divisor to determine whether to actually start profiling or not.

Once the profiling was started, subsequent calls return without doing anything.

For example: in a single entry point scenario you can set a low starting chance globally, call init(), and later set a higher starting chance for code (module/routine/action) you know run less often, and call init() again. This way you can capture profile information on parts of your code that would otherwise have a low chance of being profiled, but still have a global setting, without the two interfering with eachother.

If the tideways_xhprof extension is not loaded, the call returns false, otherwise true.

Set the log file path by defining segmentation dimensions

You can set the log file path by defining segmentation. Each level of segmentation corresponds to a directory level. The key-value pairs you provide are only evaluated when the profiling stops, so you can define and redefine segmentation levels throughout your code.

The profiling stops when the script shuts down. The collection of segmentation parameters is then sorted by key and imploded, so the keys you use matter.

If you provide an empty string as the value, that value will be replaced by the string "empty".

For example, defining these segmentations:

will result in a log file path "/tmp/some-hostname/2020-11-03/awesome-module/empty/".

Writing out the log file

The profiling stops when the internal singleton class instance is destroyed, and thus it is automatic.

The log file name itself will be the current time in the form of date, time and microsecs like this: "20201103_064423_032472.json".

The log path directories will be created as needed to house the log file.

Reading the Profile Logs

To evaluate the produced logs, use the Tideways Toolkit, which can be found at github.com/tideways/toolkit.


All versions of tideways-xhprof-free-scheduler with dependencies

PHP Build Version
Package Version
Requires php Version ^7
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 koalamer/tideways-xhprof-free-scheduler contains the following files

Loading the files please wait ....