Test , test ,test it again

maddrid

maddrid

Posted on August 22, 2020

Test , test ,test it again

My fist package

First i needed to benchmark my php application.
Then i came up with this..
Link https://packagist.org/packages/maddrid/bench.
Simple usage .

Bench::start ('first');
 for($i=5;$i<3222200;$i++){
     if ($i==2232){
         Bench::start('22');
          \random_int(0, 1000);
     }
     $v = $i*32/18;

 }
 Bench::stop('22');
 Bench::stop('first');

 Bench ::printTimers ();

output

Array
(
    [first] => Array
        (
            [cpu_load] => Not enabled
            [duration] => 0.16000104
            [memory] => 752 b
            [peak] => 539.52 kb
        )

    [22] => Array
        (
            [cpu_load] => Not enabled
            [duration] => 0.16000104
            [memory] => NAN b
            [peak] => 539.52 kb
        )

)

Not a big deal but made with love and a lot of coffee !!!

💖 💪 🙅 🚩
maddrid
maddrid

Posted on August 22, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Test , test ,test it again
php Test , test ,test it again

August 22, 2020