PHPackages                             ctohm/laravel-request-profiler - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. ctohm/laravel-request-profiler

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

ctohm/laravel-request-profiler
==============================

Prints request profiling to a file under storage/logs

0.0.2(1y ago)027MITPHPPHP ^7.4.3||&gt;=8

Since Dec 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ctohm/laravel-request-profiler)[ Packagist](https://packagist.org/packages/ctohm/laravel-request-profiler)[ RSS](/packages/ctohm-laravel-request-profiler/feed)WikiDiscussions master Synced 1mo ago

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

### Laravel Request Profiler

[](#laravel-request-profiler)

[![laravel-timings](https://private-user-images.githubusercontent.com/238439/399514277-9ea1f374-8db2-4deb-8522-de5d872b3bd9.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU0NDkyMzcsIm5iZiI6MTc3NTQ0ODkzNywicGF0aCI6Ii8yMzg0MzkvMzk5NTE0Mjc3LTllYTFmMzc0LThkYjItNGRlYi04NTIyLWRlNWQ4NzJiM2JkOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwNlQwNDE1MzdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hYTMzZDI5NDUwNGQyYmQyZGIxMmQ1MDdkZTIxZWFkYWI4YzE5ZjQ4MzgyYzFiNzlkNjRkNTZjNGQ2MGFiMzdhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.n2ssxL1a6x9vuBh9I-u1VPThsBCsIduwIGAZAW1eqig)](https://private-user-images.githubusercontent.com/238439/399514277-9ea1f374-8db2-4deb-8522-de5d872b3bd9.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU0NDkyMzcsIm5iZiI6MTc3NTQ0ODkzNywicGF0aCI6Ii8yMzg0MzkvMzk5NTE0Mjc3LTllYTFmMzc0LThkYjItNGRlYi04NTIyLWRlNWQ4NzJiM2JkOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwNlQwNDE1MzdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hYTMzZDI5NDUwNGQyYmQyZGIxMmQ1MDdkZTIxZWFkYWI4YzE5ZjQ4MzgyYzFiNzlkNjRkNTZjNGQ2MGFiMzdhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.n2ssxL1a6x9vuBh9I-u1VPThsBCsIduwIGAZAW1eqig)

Laravel Request Profiles is a package that will enable putting marks in your code to identify your application bottlenecks.

Once installed, publish the config file by doing

```
php artisan vendor:publish --provider="CTOhm\LaravelRequestProfiler\Providers\TimingsServiceProvider" --tag=config
```

The service provider will autoregister a singleton `app('timings')` that you can use to push timing marks into a dedicated message bag. We suggest starting up the timings messagebag as early as possible in the request lifecycle. For example, in the `TrustProxies` middleware. In the same middleware you can call the method to wrap up the timings for the current request when returning the output of `$next($request)`.

```
    public function handle(Request $request, Closure $next)
    {
        // jumpstart the profiler at the beggining of the middleware
        app('timings')->enabledIf(config('laravel-request-profiler.collect_timings'));
        $request->headers->set('Request-Id', (string) str()->uuid());
        app('timings')->pushTiming();

        // here goes the original content for this middleware
        $request::setTrustedProxies([], $this->getTrustedHeaderNames()); // Reset trusted proxies between requests
        $this->setTrustedProxyIpAddresses($request);

        // tap into the final output to wrap up the timings process
        return tap($next($request), function () use ($request) {
            app('timings')->pushTiming();
            app('timings')->process_timings($request);
        });
    }
```

Every time you use the `app('timings')->pushTiming()` statement, a new mark will be recorded by the profiler, as if it was a breakpoint. In the image above, you can see the final output:

- The upper section shows the spl object id of the request and its uuid, as well as the requested path.
- The lower section shows the file, the line where `pushTiming` was called, the incremental timing from the last call and the total time up to that point.
- Finally, the total ovewall time is shown.

Inspect the collected timings by doing

```
tail -f storage/logs/timings.txt
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance44

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

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.

###  Release Activity

Cadence

Every ~23 days

Total

2

Last Release

470d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/284afa1961693b50b7e6707f198ebdba58dcd78cc4998870f1227597d12581e9?d=identicon)[ffflabs](/maintainers/ffflabs)

---

Top Contributors

[![ffflabs](https://avatars.githubusercontent.com/u/238439?v=4)](https://github.com/ffflabs "ffflabs (6 commits)")

### Embed Badge

![Health badge](/badges/ctohm-laravel-request-profiler/health.svg)

```
[![Health](https://phpackages.com/badges/ctohm-laravel-request-profiler/health.svg)](https://phpackages.com/packages/ctohm-laravel-request-profiler)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[beyondcode/laravel-server-timing

Add Server-Timing header information from within your Laravel apps.

5712.0M1](/packages/beyondcode-laravel-server-timing)[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[label84/laravel-auth-log

Log user authentication actions in Laravel.

3654.0k](/packages/label84-laravel-auth-log)

PHPackages © 2026

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