Giter Club home page Giter Club logo

StatBench

tests codecov license

A Command-Line Interface and PHP library for timing the execution of a program or a block of code.

Accurately measuring small wall-clock execution times is not always possible because there is a considerable statistical error. Regardless of the method used to retrieve the timestamps for the measurement, a slightly different execution time will always be measured on each execution of a program. This is due to a number of factors. For example, the program under consideration is not the only one executed at the time of measurement and the CPU is also used by other software at all times, including background processes, that may distort the measurement. A common approach to get a more accurate measurement is to execute the program multiple times, measure the execution time for each one of them and use the average or the median of these numbers. In this way, more executions entail a more accurate measurement.

Statbench performs multiple executions of the program, on each one of which it records the execution time and uses the median and median-absolute-deviation values on all the previous measurements to remove the outliers and calculate an uncertainty for the result. The process stops when a desired uncertainty is reached.

This method provides a better estimate but not a perfect measurement of the wall-clock execution time. Hardware aspects such as the CPU caches may also affect the execution time when a program is executed multiple times in succession.

Statbench started out as a PHP implementation of the Dumbbench Perl module, and the two are very similar in most functionalities.

Installation

  1. PHP and Composer need to be installed in the system and added to the PATH environment variable.

  2. ...

  3. ...

  4. ...

    composer dump-autoload
    or
    composer install

Usage / Getting started

...

Notes

Running StatBench through the docker development container:

./statbench.sh "php ./bin/statbench ..."

References

For more information on Dumbbench refer to:

License

This project is licensed under the terms of the MIT license - see the LICENSE file for details.

StatBench's Projects

statbench icon statbench

Timing the execution of a program or a block of code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.