Download the PHP package bluetree-service/benchmark without Composer

On this page you can find all versions of the php package bluetree-service/benchmark. 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 benchmark

BlueTree Service Benchmark

Documentation

Timer basic usage

  1. Start benchmark by execute \Benchmark\Performance\Timer::start(), that will launch time storage.
  2. To measure time from start time, until some position use ::setMarker('some description'), that will save time execution and memory usage from start, or previous marker to current position.
  3. After we set sime markers, use ::stop() to halt benchmark.
  4. Use ::calculateStats() to get information about execution time and memory usage.

  5. If you want to get formatted output, look down for Timer formatting output section.

Timer advanced usage

For more cleared view, we can join stats into groups, to see, how mutch time and memory use whole group. To begin measure in group use ::startGroup('group name'), set markers inside and use ::endGroup('group name') with the same name to store stats inside one group. Of course there is possibility to create nested groups.

Timer other functions

Timer formatting output

There are three possibilities to get formatted output. First one allow to ger output as array with formatted time, memory and percentage values. second one allow to get output formatted by Symfony Console output class. And last one allow to get output as HTML.

Pre-formatted array

After \Benchmark\Performance\Timer::stop(); execute (Timer::getFormattedOutput('raw+') to get array with formatted memory, time and percentage. Using raw as parameter return raw values, the same as usage of \Benchmark\Performance\Timer::calculateStats();

Console output

After \Benchmark\Performance\Timer::stop(); execute (Timer::getFormattedOutput('shell') to get formatted output for console. Output will be equivalent of that:

HTML output

After \Benchmark\Performance\Timer::stop(); execute (Timer::getFormattedOutput('html') to get formatted output for browser. Output will be equivalent of that:

Write own output formatter

If you want to get data in you own specified format, you can apply it to method calculateStats. This method accept callable type to process data array before it will be returned.
This is how it looks inside the original code: self::calculateStats([Formatter::class, 'formatValues']); - this will execute method formatValues from Formatter::class class.

Screenshots

![]()

Install via Composer

To use packages you can just download package and pace it in your code. But recommended way to use ClassBenchmark is install it via Composer. To include ClassBenchmark libraries paste into composer json:

Required for ClassBenchmark libraries (ClassKernel) will be loaded automatically.

Project description

Used conventions

Requirements

Change log

All release version changes:
Change log

License

This bundle is released under the Apache 2.0 license.
Apache license


All versions of benchmark with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
symfony/console Version ^4.1
twig/twig Version ^2.5
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 bluetree-service/benchmark contains the following files

Loading the files please wait ....