vitorsreis / analysis
Monitor/Profiler for PHP
1.0.1
2025-02-20 18:29 UTC
Requires (Dev)
README
Simple and powerful monitor/profiler for PHP applications, featuring an interactive and real-time dashboard. Easily track performance, errors, and resource usage for your scripts and APIs.
TODO ADD BANNER IMAGE
Features
- Real-time interactive dashboard for profiling and monitoring
- Supports PHP 5.6+
- Tracks execution time, memory usage, errors, and custom actions
- Pluggable storage (SQLite + JSON by default)
- Easy integration with any PHP project (web or CLI)
- Automatic error and exception logging
- Extensible and customizable
Requirements
- PHP >= 5.6
- PDO SQLite extension enabled
- Composer for installation
Installation
composer require vitorsreis/analysis
Quick Start
Profile example (e.g., index.php)
require_once 'vendor/autoload.php'; $storage = new VSR\Analysis\Storage\SQLite(__DIR__ . '/storage/db.sqlite'); $profiler = new VSR\Analysis\Profiler('route-or-script'); $profiler->setStorage($storage); $profiler->start('controller/action'); // ... code ... $profiler->stop(); $profiler->save();
View example (e.g., viewer.php)
require_once 'vendor/autoload.php'; $storage = new VSR\Analysis\Storage\SQLite(__DIR__ . '/storage/db.sqlite'); $viewer = new VSR\Analysis\Viewer(); $viewer->setStorage($storage); $viewer->execute();