bogkov/execution-speed

This component provides the functionality to calculate the execution speed

1.0.0 2017-08-19 21:32 UTC

This package is not auto-updated.

Last update: 2024-11-10 03:20:47 UTC


README

GitHub license Latest Stable Version Minimum PHP Version Build Status codecov Scrutinizer Code Quality

Execution Speed

This component provides the functionality to calculate the execution speed

Installation

This package can be installed as a Composer dependency bogkov/execution-speed

composer require bogkov/execution-speed

Usage

<?php
$executionSpeed = new Bogkov\ExecutionSpeed\ExecutionSpeed($max = 50);
$executionSpeed->push($count = 100, $duration = 10);
$executionSpeed->push($count = 120, $duration = 11);
$executionSpeed->push($count = 90, $duration = 8);

echo 'Speed: ' . $executionSpeed->getSpeed($coefficient = 0.3, $precision = 2); // Speed: 10.85