Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/myaaghubi/f3-benchmark
A benchmark & debug helper plugin for Fat-Free framework.
https://github.com/myaaghubi/f3-benchmark
benchmark debug fat-free-framework fat-free-plugin
Last synced: 2 months ago
JSON representation
A benchmark & debug helper plugin for Fat-Free framework.
- Host: GitHub
- URL: https://github.com/myaaghubi/f3-benchmark
- Owner: myaaghubi
- License: gpl-3.0
- Created: 2020-10-05T08:34:03.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-24T09:42:41.000Z (over 1 year ago)
- Last Synced: 2024-10-11T21:53:51.932Z (3 months ago)
- Topics: benchmark, debug, fat-free-framework, fat-free-plugin
- Language: PHP
- Homepage:
- Size: 176 KB
- Stars: 8
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# F3-Benchmark
A benchmark & debug helper plugin for Fat-Free framework.![screenshot](screenshots/shot1.jpg?raw=true "F3 Benchmark Screentshot")
### Install
Just run the below code:
```
composer require myaghobi/f3-benchmark
```### Usage
The plugin works if `DEBUG>=3`, otherwise, it goes disable to prevent security issues and with no resource usage.
Initiate `Benchmark` after your config file:``` php
$f3->config('config.ini');
\Benchmark::instance();
...
```
or
``` php
// $f3->set('UI', 'ui/');
$f3->set('UI', YOUR_UI_PATH);
// $f3->set('DEBUG', 3);
$f3->set('DEBUG', YOUR_DEBUG_LEVEL);\Benchmark::instance();
```
The plugin reserve `benchmark` in `f3`, after initiate, you can make your checkpoints:
``` php
$f3->get('benchmark')->checkPoint('myTag');
...
```
For `DEBUG<3`, the plugin goes disable with no resource usage so it's not necessary to remove your checkpoints in production mode.## License
You are allowed to use this plugin under the terms of the GNU General Public License version 3 or later.
Copyright (C) 2023 Mohammad Yaghobi