PHPackages                             richtoms/spot - 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. richtoms/spot

ActiveLibrary

richtoms/spot
=============

Simple PHP Object Tracker

v0.1(5y ago)07MITPHPPHP ^7.1

Since Feb 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/RichToms/spot)[ Packagist](https://packagist.org/packages/richtoms/spot)[ Docs](https://github.com/richtoms/spot)[ RSS](/packages/richtoms-spot/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

SPOT: Simple PHP Object Tracker
===============================

[](#spot-simple-php-object-tracker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dc25ab3b6b769ef87f17dd083d06c533c7520197b2c5400b7b5d13e2c2931daa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72696368746f6d732f73706f742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/richtoms/spot)[![Build Status](https://camo.githubusercontent.com/0f2eebf3418dd392d0a4ec7aecb14d941c1a5760781d7fd35ff6be61d31e8142/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f72696368746f6d732f73706f742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/richtoms/spot)[![Total Downloads](https://camo.githubusercontent.com/e0452025eaa5b2ac12122c131539f510364aff87afbed99055b5f19c3d05217f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72696368746f6d732f73706f742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/richtoms/spot)

SPOT is a small library designed to track timing and memory usage of your PHP functions and class methods.

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

[](#installation)

You can install the package via composer:

```
composer require richtoms/spot
```

Usage
-----

[](#usage)

Using the class tracker for a class.

```
use RichToms\Spot\ClassTracker;

$tracker = new ClassTracker(new Foo('Bar'));
$tracker->methodOnFoo()
    ->anotherMethod()
    ->andAnother();

// Result of fluently calling methods on the `Foo` class.
$result = $tracker->getResult();

// List of events tracked while calling many methods on the `Foo` class.
$events = $tracker->getEvents();
```

Using the closure tracker.

```
$tracker = new ClosureTracker(function ($array) {
    return array_map(function ($item) {
        return $x += 1;
    }, $array);
}, [[1, 2, 3, 4]]);

// Result of the Closure.
$result = $tracker->getResult();

// List of events tracked when calling the Closure.
$result->getEvents();
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Richard Toms](https://github.com/richtoms)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

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 ~0 days

Total

2

Last Release

1904d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/473a642cbf1c351d418d747ae099c4b6e32eb2fafc8089266dec817c81cea42c?d=identicon)[richtoms](/maintainers/richtoms)

---

Top Contributors

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

---

Tags

spot

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/richtoms-spot/health.svg)

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

PHPackages © 2026

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