2017 © Pedro Peláez
 

library benchmark

Benchmark your code by tracking duration and memory usage of your code

image

kanel/benchmark

Benchmark your code by tracking duration and memory usage of your code

  • Sunday, April 2, 2017
  • by elkaadka
  • Repository
  • 0 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

build, (*1)

A simple tool to benchmark time execution and memory usage, (*2)

How it works :

  • Start the benchmarkg Benchmark::start();
  • Mark a place as a lap (the benchmark will continue), (*3)

       $usage = Benchmark::lap();
    

    where $usage is an array :, (*4)

    [
        'time'   => ...,
        'memory' => ...,
    ]
    
  • If you want the benchmark between the two last laps, send the following parameter:, (*5)

       $usage = Benchmark::lap(Benchmark::FROM_LAST_LAP);
    
  • To stop the Benchmark and get the time/memory from the beginning (the start) $usage = Benchmark::stop();
  • To stop the Benchmark tracking and get the memory used and duration from the last lap, (*6)

        $usage = Benchmark::stop(Benchmark::FROM_LAST_LAP);
    
  • To get the Benchmark history, (*7)

        $usage = Benchmark::getHistory();
    

The Versions

02/04 2017

dev-master

9999999-dev

Benchmark your code by tracking duration and memory usage of your code

  Sources   Download

The Requires

 

The Development Requires

by Adil El Kanabi

02/04 2017

1.0.0

1.0.0.0

Benchmark your code by tracking duration and memory usage of your code

  Sources   Download

The Requires

 

The Development Requires

by Adil El Kanabi