PHPackages                             componenta/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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. componenta/profiler

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

componenta/profiler
===================

Request and service profiling for Componenta framework — dev-only dependency

v1.0.0(1mo ago)02MITPHPPHP ^8.4

Since Jun 16Pushed 1mo agoCompare

[ Source](https://github.com/componenta/profiler)[ Packagist](https://packagist.org/packages/componenta/profiler)[ RSS](/packages/componenta-profiler/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

Componenta Profiler
===================

[](#componenta-profiler)

Development-time profiler for request lifecycle, boot timing, service instrumentation, and timeline rendering.

Use this package as an optional development dependency. It is designed to be easy to disable in production: application code can depend on `ProfilerInterface`, while config decides whether the real profiler or a no-op integration is wired.

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

[](#installation)

```
composer require componenta/profiler
```

This package intentionally does not declare `extra.componenta.config-providers`. Register `Componenta\Profiler\ConfigProvider` manually from development-only application config when profiling is enabled.

Requirements
------------

[](#requirements)

- PHP 8.4+

Related Packages
----------------

[](#related-packages)

PackageWhy it matters here`psr/http-message` / `psr/http-server-middleware`Timing and profiler middleware work with PSR-7 requests, PSR-7 responses, and PSR-15 handlers.`componenta/pipeline`Profiling can wrap middleware pipelines.`componenta/app`Boot timing and early marks belong to the application lifecycle.`componenta/di`Service delegators can profile selected classes.Core API
--------

[](#core-api)

```
use Componenta\Profiler\Profiler;

$profiler = new Profiler();

$profiler->mark('boot');

$span = $profiler->span('controller');
// run work
$span->close();

$marks = $profiler->marks();
```

Marks are ordered records with labels, timestamps, memory usage, and type:

- `Point`: instant marker
- `Begin`: span start
- `End`: span end

Early Bootstrap Marks
---------------------

[](#early-bootstrap-marks)

`Marks` is a process-global facade for points that happen before the DI container exists:

```
use Componenta\Profiler\Marks;

Marks::mark('autoload.loaded');
```

The application integration can merge these early marks into the configured `ProfilerInterface`.

Rendering
---------

[](#rendering)

Renderers convert collected marks into formats useful for debugging:

- `JsonRenderer`: structured machine-readable output.
- `ServerTimingRenderer`: `Server-Timing` header value.
- `WaterfallRenderer`: human-readable timeline.
- `CompositeRenderer`: chooses among renderers.

HTTP And Framework Integration
------------------------------

[](#http-and-framework-integration)

The integration layer includes:

- `TimingMiddleware`: marks PSR-15 request handling.
- `ProfilerMiddleware`: exposes profiler output when a trigger matches.
- `TimingBootloader`: records bootloader spans.
- service delegators for profiling selected classes.
- `ProfilingPipelineFactory` for wrapping middleware pipelines.

Triggers
--------

[](#triggers)

Triggers decide whether profiling output should be enabled for a request:

- query parameter trigger
- header trigger
- cookie trigger
- composite trigger

This keeps profiling opt-in and avoids exposing profiler data by default.

DI Registration
---------------

[](#di-registration)

`ConfigProvider` registers profiler services, renderers, triggers, and optional integration points. Keep the package dev-only unless the application has an explicit production observability use case.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance91

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

43d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20490712?v=4)[Andrey Shelamkoff](/maintainers/Shelamkoff)[@Shelamkoff](https://github.com/Shelamkoff)

---

Top Contributors

[![Shelamkoff](https://avatars.githubusercontent.com/u/20490712?v=4)](https://github.com/Shelamkoff "Shelamkoff (1 commits)")

---

Tags

devprofilerpsr-15Server-Timingtimingwaterfall

### Embed Badge

![Health badge](/badges/componenta-profiler/health.svg)

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[cakephp/cakephp

The CakePHP framework

8.8k19.5M1.8k](/packages/cakephp-cakephp)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k17](/packages/tempest-framework)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[sunrise/http-router

A powerful solution as the foundation of your project.

17451.8k11](/packages/sunrise-http-router)[typo3/cms-core

TYPO3 CMS Core

3713.2M5.2k](/packages/typo3-cms-core)

PHPackages © 2026

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