PHPackages                             nexelity/bprof-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. nexelity/bprof-laravel

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

nexelity/bprof-laravel
======================

A Laravel wrapper for the PHP bprof profiler extension

00PHP

Since Jan 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/nexelity/bprof-laravel)[ Packagist](https://packagist.org/packages/nexelity/bprof-laravel)[ RSS](/packages/nexelity-bprof-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

BProf - Laravel
===============

[](#bprof---laravel)

[![Build Status](https://camo.githubusercontent.com/0888eb985a50fd521c9855e972462963e0b42edd7af71b68b4e54fc971989e14/68747470733a2f2f7472617669732d63692e636f6d2f6e6578656c6974792f6270726f662d6c61726176656c2e7376673f6272616e63683d6d61696e)](https://travis-ci.com/nexelity/bprof-laravel)[![codecov](https://camo.githubusercontent.com/b68c2100f712400c8d00b26e4844bd8ce3eaa31d99e4b09b7c1e9bf39ac3aad0/68747470733a2f2f636f6465636f762e696f2f67682f6e6578656c6974792f6270726f662d6c61726176656c2f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d5a515a515a515a515a51)](https://codecov.io/gh/nexelity/bprof-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/63a6dc84c2df53967123cf5835561833f5eb12bf5b7f26a1597c0b265d4d3941/68747470733a2f2f706f7365722e707567782e6f72672f6e6578656c6974792f6270726f662d6c61726176656c2f76)](//packagist.org/packages/nexelity/bprof-laravel)[![Total Downloads](https://camo.githubusercontent.com/f2508a5f5d0243a36f1b9e326275e2952badf8f2861e6ae21f9fba3ded2592a9/68747470733a2f2f706f7365722e707567782e6f72672f6e6578656c6974792f6270726f662d6c61726176656c2f646f776e6c6f616473)](//packagist.org/packages/nexelity/bprof-laravel)[![License](https://camo.githubusercontent.com/5ce5723b288a88e8ec2a704b2ec82787d81e5520e8a342b0de4d013d19975f49/68747470733a2f2f706f7365722e707567782e6f72672f6e6578656c6974792f6270726f662d6c61726176656c2f6c6963656e7365)](//packagist.org/packages/nexelity/bprof-laravel)

📚 Description
-------------

[](#-description)

A Laravel wrapper package for the [BProf](https://github.com/nexelity/bprof-ext) PHP profiler.

Uncover bottlenecks, memory hogs, and performance insights in your Laravel PHP code with BProf! A heavy adaptation of the renowned [XHProf](https://github.com/phacility/xhprof) library, fine-tuned for modern PHP applications.

🌟 Features
----------

[](#-features)

- 🔍 Detailed function-level insights
- 📈 Real-time application performance monitoring
- 📊 Easy-to-visualize data
- ⚙️ Easy integration
- 🚀 Speed up your PHP applications!

⚙️ Pre-requisites
-----------------

[](#️-pre-requisites)

1. PHP `>=8.0` and `ext-zlib` extension enabled.
2. Laravel `>=8.40`
3. Linux or macOS (Windows is not supported)
4. `bprof-ext` php extension installed. See [here](https://github.com/nexelity/bprof-ext).
5. `bprof-viewer` installed and running. See [here](https://github.com/nexelity/bprof-viewer/).
6. Eloquent compatible database (MySQL, PostgreSQL, SQLite, SQL Server)

🚀 Installation
--------------

[](#-installation)

1. Install the wrapper

```
composer require nexelity/bprof-laravel
```

2. Publish the config file

```
php artisan vendor:publish --provider="Nexelity\Bprof\BprofLaravelServiceProvider"
```

3. Add the following to your .env file and modify as needed

```
BPROF_ENABLED=true
BPROF_VIEWER_URL=http://localhost:8080
BPROF_SERVER_NAME=My App
BPROF_DB_CONNECTION=mysql
BPROF_DB_TABLE=bprof_traces

```

4. Run migrations, this will create the traces table.

```
php artisan migrate
```

5. Clear config cache

```
php artisan config:clear

```

6. Add the middleware to your app/Http/Kernel.php

```
protected $middleware = [
    ...
    \Nexelity\Bprof\Http\Middleware\BprofMiddleware::class,
];
```

7. Start profiling!

🖥️ Artisan commands
-------------------

[](#️-artisan-commands)

```
# Truncate the traces table
php artisan bprof:truncate

# Trim traces older than X hours
php artisan bprof:trim {ageInHours}
```

###  Health Score

12

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/18093c261d71927c60f66bae736fd7ffd01b38fd47f8adb9a88cb40a46b2506a?d=identicon)[nexelity](/maintainers/nexelity)

---

Top Contributors

[![benpoulson](https://avatars.githubusercontent.com/u/1797843?v=4)](https://github.com/benpoulson "benpoulson (18 commits)")

### Embed Badge

![Health badge](/badges/nexelity-bprof-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/nexelity-bprof-laravel/health.svg)](https://phpackages.com/packages/nexelity-bprof-laravel)
```

###  Alternatives

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M918](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k29](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[jokkedk/webgrind

Webgrind is a Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick'n'dirty optimizations it does the job.

3.3k193.0k](/packages/jokkedk-webgrind)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
