Download the PHP package jkocik/laravel-profiler without Composer

On this page you can find all versions of the php package jkocik/laravel-profiler. 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 laravel-profiler

Laravel Profiler

Build Status Coverage Status

The aim of this project is to track console and web Laravel framework execution and give developers better understanding what is going on under the hood. Laravel Profiler is designed for Laravel Framework.

Laravel Profiler

Supported versions

Laravel Framework version you have Laravel Profiler version you should use
5.2.x - 5.8.x 1.x
6.x - 8.x 2.x

How does it work?

Profiler delivers data about Laravel framework execution:

Profiler does not add any routes to your application and does not modify the content of the response.

Profiler is divided into 3 parts:

Profiler Client and Profiler Server both live in laravel-profiler-client repository

Data flow

Profiler Package tracks Laravel execution and sends collected data to Profiler Server using HTTP. Profiler Server passes data to Profiler Client using WebSockets.

Trackers

Data tracked, collected and delivered to Profiler Client are:

Profiler and its trackers do their job after request / artisan command is finished. That keeps your framework execution time and peak of memory usage as close to real values (without Profiler impact) as possible.

Installation and configuration

Step 1: Install Profiler Package

Requirements: PHP 7.2+

It is recommended to install Profiler Package only for development

Step 2: Publish configuration file

Run command

... and check config/profiler.php file for Profiler settings.

Step 3: Install Profiler Server and Profiler Client

It is recommended to install Profiler Server and Profiler Client only for development

Step 4: Run Profiler Server and Profiler Client

Windows users: If you have any issue with running Profiler Server or Profiler Client check Installation options / issues section below.

Run command

and

a) for your local machine

After that your browser should have new tab opened with Profiler Client connected to Profiler Server.

b) for Docker, Vagrant or any other machine different from local

... and open new browser tab according to instructions in console. Remember that you need to connect Profiler Client to Profiler Server yourself because by default Profiler Client uses localhost. You can do that in Profiler Client interface.

Step 5: Verify installation

Run command

... to check Profiler status and see first data of Laravel execution in Profiler Client.

Installation options / issues

a) If you have any issue with running Profiler Server or Profiler Client use npm scripts instead of artisan commands. Add new scripts to your package.json file

... then run Profiler Server

... and Profiler Client

b) If you don't want to open new browser tab every time you run Profiler Client command use manual option

c) If default ports used by Profiler are taken on your machine configure them in config/profiler.php file.

Done!

You are ready to use Laravel Profiler. Enjoy!

Usage

Performance metrics

Profiler delivers basic performance metrics including peak of memory usage and Laravel execution time. You can extend metrics by using Profiler helper functions:

Then check results in Profiler Client (Performance > Custom tab). You should keep unique metric names otherwise duplicates will be skipped and reported as an error (in a way according to your exception handling settings in config/profiler.php file).

Important notice: remove Profiler helper functions from your code before moving to production or any environment without Profiler installed.

Laravel Profiler for testing environment

When testing Profiler will deliver the same data as for regular request / artisan command. However application should be terminated. Lets see two default tests Laravel is shipped with:

First test will terminate application and Profiler will work as expected. However second test

... will not provide any data because this time application is not terminated. You can force Profiler to work by adding terminate method:

If you want to reset Profiler trackers you can use Profiler helper:

Important notice related to testing environment: peak of memory usage can not be tracked for each test separately so is not shown in Profiler Client.

Using together with Laravel Debugbar

It is not recommended using Laravel Profiler and Laravel Debugbar together. Profiler will finish its work after Debugbar and Profiler report of framework execution time and peak of memory usage will be increased by Debugbar activity. Use Profiler or Debugbar one at a time.


All versions of laravel-profiler with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
guzzlehttp/guzzle Version ^5.0 || ^6.0 || ^7.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 jkocik/laravel-profiler contains the following files

Loading the files please wait ....