Skip to content
This repository

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Benchmark.php
Octocat-spinner-32 README.markdown
README.markdown

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.

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

Something went wrong with that request. Please try again.