hoaproject / bench Goto Github PK
View Code? Open in Web Editor NEWThe Hoa\Bench library.
Home Page: https://hoa-project.net/
The Hoa\Bench library.
Home Page: https://hoa-project.net/
Sample :
use Hoa\Bench;
$tab = \SplFixedArray::fromArray(['Gg', 'est', 'le', 'plus', 'beau']);
$bench = new Bench();
$bench->one->start();
for($i=0;$i<$tab->count();$i++){
echo $tab[$i];
}
$bench->one->stop();
$bench->two->start();
//le foreach
foreach($tab as $value){
echo $value;
}
$bench->two->stop();
echo $bench;
Result :
global |||||||||||||||||||||||||||||||||||||||||||||||||||||| 0ms, 104.1%
one |||||||||||||||||||||| 0ms, 43.2%
two |||||||||| 0ms, 19.1%
Renamming property and method isRunning to isStarted should be more explicit.
For a while isRunning()
should be depricated.
cf https://github.com/hoaproject/Bench/pull/30/files#r36389896
This is a feature request. We're using Hoa\Bench to measure how slow we are for a number of things.
We manually also output PHP memory right at the bottom, as you can see here:
https://github.com/fruux/sabre-vobject/blob/master/bin/bench_freebusygenerator.php#L61
I was wondering if this could also be a good Hoa\Bench built-in feature =)
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
This library allows to analyze performance of algorithms or programs by placing some “marks” in the code. Furthermore, this library proposes some >>>>> DTrace <<<<< programs.
DTrace is a link to http://opensolaris.org/os/community/dtrace/ which no longer works
Write english documentation for #30
/**
* Pause all marks.
*
* @return array
*/
public function pause();
/**
* Resume all marks.
*
* @param array $runningMarks The marks to resume.
* @return void
*/
public function resume($runningMarks);
Write french documentation for #30
/**
* Pause all marks.
*
* @return array
*/
public function pause();
/**
* Resume all marks.
*
* @param array $runningMarks The marks to resume.
* @return void
*/
public function resume($runningMarks);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.