Skip to content
Benchmarking class designed for Yii; can be easily adopted for any other PHP framework
Find file
Latest commit b413dc6 @nmakarov Update README.markdown
Failed to load latest commit information.
tests/unit v0.2
.gitignore Initial commit
Benchmark.php v0.2
README.markdown Update README.markdown



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:

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:

Installation and configuration

Just download the script from, place Benchmark.php in /protected/extentions folder


Include the extention and create an instance:

$bench = Benchmark::getInstance();

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



Something went wrong with that request. Please try again.