Skip to content

myaaghubi/f3-benchmark

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

F3-Benchmark

A benchmark & debug helper plugin for Fat-Free framework.

screenshot

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:

$f3->config('config.ini');
\Benchmark::instance();
...

or

// $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:

$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) 2021 Mohammad Yaghobi