Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ancat/benchmarky
Simple benchmarking in PHP using keys to manage multiple timers
https://github.com/ancat/benchmarky
Last synced: about 2 months ago
JSON representation
Simple benchmarking in PHP using keys to manage multiple timers
- Host: GitHub
- URL: https://github.com/ancat/benchmarky
- Owner: ancat
- Created: 2012-06-13T22:18:43.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-06-14T04:49:16.000Z (over 12 years ago)
- Last Synced: 2023-03-24T10:57:02.368Z (almost 2 years ago)
- Language: PHP
- Homepage:
- Size: 105 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Benchmarky
==========Benchmarky is a small static class that makes benchmarking multiple
operations at the same time really easy. Most benchmarking classes
require creating some type of benchmarking object per each operation
you would like to keep track of. Not with benchmarky!It has a cool name, too!
The general idea is each operation being benchmarked has its own key.
Timer organizes the keys on its own, so all you have to do is start
and stop the Timer, just using the key name.
This produces the following output:
Results for md5: 5000 tests; Max: 5.793571472168E-5; Min: 2.8610229492188E-6; Avg: 3.762674331665E-6; Total: 0.018813371658325
Results for sha1: 5000 tests; Max: 0.00011992454528809; Min: 2.8610229492188E-6; Avg: 4.1135787963867E-6; Total: 0.020567893981934The results are all available in Timer::$results, so you can display the data as you see fit.