PHPackages                             lucifer07/phpuan-jck - 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. lucifer07/phpuan-jck

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

lucifer07/phpuan-jck
====================

A Laravel Performance Profiler Library for local development with Xdebug integration

v1.0.0(4mo ago)00PHPPHP ^8.0

Since Jan 16Pushed 3mo agoCompare

[ Source](https://github.com/Lucifer07/php-uan-jck)[ Packagist](https://packagist.org/packages/lucifer07/phpuan-jck)[ RSS](/packages/lucifer07-phpuan-jck/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

PhpuanJck ( php unit analize jerk code keys) - Laravel Performance Profiler
===========================================================================

[](#phpuanjck--php-unit-analize-jerk-code-keys---laravel-performance-profiler)

using Xdebug traces to detect memory leaks and slow execution paths.

Features
--------

[](#features)

- 📊 Dashboard with performance statistics
- 🔍 Trace browser and detailed view
- ⚠️ Automatic problem detection (slow functions, memory hogs, high frequency calls)
- 📈 Hotspot identification
- 💾 Memory usage tracking
- 🚀 Zero overhead when disabled

Installation
------------

[](#installation)

### Quick Install (Recommended)

[](#quick-install-recommended)

```
composer require phpuan-jck/phpuan-jck
php artisan phpuan-jck:install
```

That's it! The installer will:

- Publish configuration file
- Publish migrations
- Run migrations
- Register middleware automatically

### Manual Install

[](#manual-install)

If you prefer manual installation:

```
# 1. Install package
composer require lucifer07/phpuan-jck

# 2. Publish configuration
php artisan vendor:publish --provider="PhpuanJck\Providers\PhpuanJckServiceProvider" --tag="phpuan-jck-config"

# 3. Publish and run migrations
php artisan vendor:publish --provider="PhpuanJck\Providers\PhpuanJckServiceProvider" --tag="phpuan-jck-migrations"
php artisan migrate

# 4. Register middleware (bootstrap/app.php for Laravel 10+)
$middleware->append(\PhpuanJck\Middleware\ProfilerMiddleware::class);
```

Configuration
-------------

[](#configuration)

### Xdebug (Required)

[](#xdebug-required)

Xdebug must be installed and configured:

```
[xdebug]
xdebug.mode=profile,trace
xdebug.start_with_request=no
xdebug.trace_format=1
xdebug.trace_output_dir=/tmp
```

Restart PHP-FPM or Valet after configuration.

### Optional Config

[](#optional-config)

Edit `config/phpuan-jck.php`:

```
return [
    'enabled' => env('PHPUAN_JCK_ENABLED', true),
    'slow_threshold_ms' => 100, // Default threshold for slow functions
    'memory_threshold_bytes' => 1048576, // 1MB
    'ignore_namespaces' => [
        'Illuminate\\',
        'Composer\\',
        'Symfony\\',
        'Carbon\\',
    ],
    'ignore_paths' => [
        '/vendor/',
        '/storage/framework/',
    ],
];
```

Usage
-----

[](#usage)

### Profile a Request

[](#profile-a-request)

Add `?__profile=true` to any URL:

```
curl http://your-app.test/api/users?__profile=true
```

Or visit in browser:

```
http://your-app.test/api/users?__profile=true

```

### Access Dashboard

[](#access-dashboard)

Visit `http://your-app.test/phpuan-jck` to access the profiler dashboard.

**Available Routes:**

- `/phpuan-jck` - Main Dashboard
- `/phpuan-jck/traces` - Browse all traces
- `/phpuan-jck/detail/{id}` - View trace details
- `/phpuan-jck/problems` - View detected problems
- `/phpuan-jck/call-path` - Call path analysis
- `/phpuan-jck/telescope` - Telescope-style overview

### Problem Detection

[](#problem-detection)

PhpuanJck automatically detects:

- **Slow Functions** - Functions taking more than 2x threshold (default: 200ms)
- **Memory Hogs** - Functions using more than 1MB of memory
- **High Frequency Calls** - Functions called more than 20 times
- **Nested Loops** - Potential O(n²) complexity issues

Commands
--------

[](#commands)

```
# Install PhpuanJck
php artisan phpuan-jck:install

# Cleanup old traces
php artisan phpuan-jck:cleanup

# Cleanup with dry-run
php artisan phpuan-jck:cleanup --dry-run
```

Performance
-----------

[](#performance)

- **Zero overhead** when profiling is disabled
- **Minimal overhead** (~5-10%) when profiling is enabled
- Uses Xdebug traces for accurate call stack attribution
- Stores only trace metadata in database, trace files stored separately

Security
--------

[](#security)

⚠️ **Important**: PhpuanJck is designed for **local development only**.

Disable in production:

```
# In .env
PHPUAN_JCK_ENABLED=false
```

Or restrict to local environment:

```
// In config/phpuan-jck.php
'enabled' => env('APP_ENV') === 'local',
```

Development
-----------

[](#development)

### Run tests

[](#run-tests)

```
vendor/bin/pest
```

### Clear cache

[](#clear-cache)

```
php artisan cache:clear
php artisan config:clear
php artisan view:clear
```

Troubleshooting
---------------

[](#troubleshooting)

### "Xdebug not found" error

[](#xdebug-not-found-error)

Ensure Xdebug is installed and configured in your `php.ini`.

### Traces not appearing

[](#traces-not-appearing)

1. Check `config/phpuan-jck.php` has `'enabled' => true`
2. Ensure middleware is registered
3. Verify database migrations ran successfully
4. Check storage permissions for trace files

### Dashboard shows 404

[](#dashboard-shows-404)

1. Clear routes cache: `php artisan route:clear`
2. Clear config cache: `php artisan config:clear`
3. Verify ServiceProvider is registered

License
-------

[](#license)

MIT License

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance79

Regular maintenance activity

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

121d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d8bb74f9b8ca74edb590bc5c9f0673b1e2cfebe3b1bc3241e0ed489b7941d4f3?d=identicon)[Lucifer07](/maintainers/Lucifer07)

### Embed Badge

![Health badge](/badges/lucifer07-phpuan-jck/health.svg)

```
[![Health](https://phpackages.com/badges/lucifer07-phpuan-jck/health.svg)](https://phpackages.com/packages/lucifer07-phpuan-jck)
```

###  Alternatives

[fruitcake/laravel-telescope-toolbar

Toolbar for Laravel Telescope based on Symfony Web Profiler

8041.6M3](/packages/fruitcake-laravel-telescope-toolbar)[laracraft-tech/laravel-xhprof

Easy XHProf setup to profile your laravel application!

235321.4k](/packages/laracraft-tech-laravel-xhprof)[spatie/laravel-artisan-dd

Run dd from your commandline

16387.7k1](/packages/spatie-laravel-artisan-dd)[bavix/laravel-xhprof

Quick profiling of your code for Laravel

22156.6k](/packages/bavix-laravel-xhprof)[daylerees/anbu

The Anbu profiler for Laravel 4.

3054.9k](/packages/daylerees-anbu)[thehocinesaad/laravel-error-ai

This package adds Ask AI button to the error page.

2214.4k](/packages/thehocinesaad-laravel-error-ai)

PHPackages © 2026

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