american-technologies / laravel-script-time-logger
Logs the runtime of a script to a database table, used for automated scripts to see fluctuations in time
Installs: 49
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
pkg:composer/american-technologies/laravel-script-time-logger
Requires
- php: ^8.2.0
- laravel/framework: ^11.0
README
The AmTech Script Time Logger is an addon to Laravel that allows you track the duration of a script you are running to a database. This can be utilized for setting cron schedules, checking performance etc.
Installation
Use Composer to install into Laravel project.
# install package composer require american-technologies/laravel-script-time-logger # run migrate to create database php artisan migrate
Usage
use AmericanTechnologies\ScriptTimeLogger\ScriptTimeLogger; $scriptLog = new ScriptTimeLogger(); $scriptLog->startTimer($nameOfScript); ... $scriptLog->endTimer($optionalNote);