bogkov / execution-speed
This component provides the functionality to calculate the execution speed
1.0.0
2017-08-19 21:32 UTC
Requires
- php: ^7.0
Requires (Dev)
- phpunit/phpunit: ^6.3
This package is not auto-updated.
Last update: 2024-12-22 03:56:21 UTC
README
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