Skip to content

Benchmarking class designed for Yii; can be easily adopted for any other PHP framework

Notifications You must be signed in to change notification settings

nmakarov/Benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Benchmark

Very simple yet useful benchmarking/logging class to be used in Yii framework. Since it uses no Yii-specific stuff, it is suitable for any other framework.

Detailed description is here: http://www.yiiframework.com/extension/benchmark/

For me it is always annoying to look at the logs and see each line begins with

2012-06-23 19:06:27 ...

For me usable info is:

  • when the script starts (timestamp)
  • how long each operation goes (with brief description)
  • grouped totals - how many time each op run and, total execution time and average execution time per operation

Detailed description and usage may be found here: http://www.yiiframework.com/extension/benchmark/

Installation and configuration

Just download the script from http::github.com/nmakarov/Benchmark, place Benchmark.php in /protected/extentions folder

Usage

Include the extention and create an instance:

Yii::import('ext.Benchmark');
$bench = Benchmark::getInstance();

Basic usage can be found in 'tests/unit/BenchmarkTest.php'

Cheers,

-Nick

About

Benchmarking class designed for Yii; can be easily adopted for any other PHP framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages