Skip to content

headhsu2568/SimplePHPBench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 

Repository files navigation

SimplePHPBench

v0.5

A simple benchmark tool for PHP

Quick Start

require_once('PHPBench.php');
$PB = new PHPBench(); // output to screen
$PB = new PHPBench("benchmark.log"); // output to file
$PB->start();
$PB->tick("the first tick"); // record this tick
$PB->tick("the second tick"); // record this tick
$PB->end();
$PB->report();

The output example:

-------------------------------------------------------------------------------------
>[Seq no.] Timestamp (Elapsed Time) - Memory Usage (Peak Memory Usage) - Description
-------------------------------------------------------------------------------------
>[1] 1371274724.0709700 (+0.0000000 secs) - 288112 bytes (302960 bytes) - PHPBench starts
>[2] 1371274724.0712380 (+0.0002680 secs) - 299840 bytes (304360 bytes) - the first tick
>[3] 1371274724.0713130 (+0.0003430 secs) - 303984 bytes (308504 bytes) - the second tick
>[4] 1371274724.0715560 (+0.0005860 secs) - 317832 bytes (322496 bytes) - PHPBench ends

=========================================
> Elapsed Time: 0.0005860 secs
> Declared Classes: 4
> Included Files: 3
> Peak Memory Usage: 322496 bytes
=========================================

- - - ###### by _Yen-Chun Hsu_ ####### - - -

About

A simple benchmark tool for PHP

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages