skillaug / benchmark
Good Performance need to benchmark
Installs: 890
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 0
Open Issues: 0
Type:php
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-09-14 14:55:42 UTC
README
Find the best solution by using benchmark
Installation
composer require --dev skillaug/benchmark "~1.0.0"
Usages
Basic
\skillaug\Benchmark::begin(); // your codes for benchmark here \skillaug\Benchmark::end();
example results
Time: 74 Mili second(s)
Memory_get_usage: 26 Megabyte(s)
Memory_get_peak_usage: 25.961 Megabyte(s)
With unit options
\skillaug\Benchmark::begin([ 'time' => 's', // second(s) 'memory' => 'kb', // kilobyte(s) ]);
example results
Time: 0.0759 Second(s)
Memory_get_usage: 26624.06 Kilobyte(s)
Memory_get_peak_usage: 26584.53 Kilobyte(s)
License
The BSD 3-Clause "New" or "Revised" License.