PHPackages                             maximaster/tideways-xhprof - 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. maximaster/tideways-xhprof

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

maximaster/tideways-xhprof
==========================

A library to save tideways-xhprof trace files.

v1.0.0(1y ago)05MITPHPPHP &gt;=7.4

Since Sep 2Pushed 1y ago2 watchersCompare

[ Source](https://github.com/maximaster/tideways-xhprof)[ Packagist](https://packagist.org/packages/maximaster/tideways-xhprof)[ RSS](/packages/maximaster-tideways-xhprof/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

maximaster/tideways-xhprof
==========================

[](#maximastertideways-xhprof)

Use `tideways-xhprof` PHP extension and this library to save **xhprof** traces as files and watch them later with some viewer like [wodby/xhprof](https://github.com/wodby/xhprof).

```
composer require maximaster/tideways-xhprof
```

Hot to use it in local scope?
=============================

[](#hot-to-use-it-in-local-scope)

Manually construct `TidewaysXhprofSession` then use `start()` and `stop()`methods. Also, you can use `TidewaysXhprofSessionInterface` to inject the service as dependency and configure it in your DI-container.

How to use to profile everything happened on hit?
-------------------------------------------------

[](#how-to-use-to-profile-everything-happened-on-hit)

- configure environment variables (see section below);
- set `auto_prepend_file` to `vendor/maximaster/tideways-xhprof/inc/xhprof.php`or `include` it as much early as you can;
- make requests with configured trigger and analyze produced trace files in configured directory.

Environment variables
---------------------

[](#environment-variables)

### MAXIMASTER\_TIDEWAYS\_XHPROF\_TRIGGER\_NAME

[](#maximaster_tideways_xhprof_trigger_name)

Configure trigger name which should start profiling. Its value would be looked for in all global variables.

Defaults to `XHPROF`.

### MAXIMASTER\_TIDEWAYS\_XHPROF\_TRIGGER\_VALUE

[](#maximaster_tideways_xhprof_trigger_value)

A secret string which would start profiling on being found in trigger variable.

Have no default value. Profiling won't start if it's empty.

### MAXIMASTER\_TIDEWAYS\_XHPROF\_DIRECTORY

[](#maximaster_tideways_xhprof_directory)

A directory to save trace files.

Defaults to `getcwd()`.

### MAXIMASTER\_TIDEWAYS\_XHPROF\_FILENAME\_FORMAT

[](#maximaster_tideways_xhprof_filename_format)

How trace files should be named. You can use macroses:

- `#date#` - see `MAXIMASTER_TIDEWAYS_XHPROF_DATETIME_FORMAT` below;
- `#uniqid#` - result of `uniqid()`.

Defaults to `#date##uniqid#.default.xhprof`.

### MAXIMASTER\_TIDEWAYS\_XHPROF\_DATETIME\_FORMAT

[](#maximaster_tideways_xhprof_datetime_format)

Uses as [DateTime::format](https://www.php.net/manual/ru/datetime.format.php)argument and result replaces `#date#` macros in `MAXIMASTER_TIDEWAYS_XHPROF_FILENAME_FORMAT`.

Determines which will be replaced to `#date#` macros in .

Defaults to 'Ymdhis'.

### MAXIMASTER\_TIDEWAYS\_XHPROF\_FLAGS

[](#maximaster_tideways_xhprof_flags)

Any combination of `TIDEWAYS_XHPROF_FLAGS_*` constants. Used when `tideways_xhprof_enable()` is called.

Defaults to no flags (`0`).

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

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

670d ago

### Community

Maintainers

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

---

Top Contributors

[![mlavrinenko](https://avatars.githubusercontent.com/u/15840214?v=4)](https://github.com/mlavrinenko "mlavrinenko (2 commits)")

### Embed Badge

![Health badge](/badges/maximaster-tideways-xhprof/health.svg)

```
[![Health](https://phpackages.com/badges/maximaster-tideways-xhprof/health.svg)](https://phpackages.com/packages/maximaster-tideways-xhprof)
```

###  Alternatives

[spatie/craft-ray

Easily debug CraftCMS projects

1638.6k](/packages/spatie-craft-ray)

PHPackages © 2026

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