Skip to content

Instantly share code, notes, and snippets.

View rdominy's full-sized avatar

Robert Dominy rdominy

View GitHub Profile
@rdominy
rdominy / timingtest.php
Created September 13, 2013 23:20
This command line PHP script tests algorithm times, keeping track of results in a histogram. Each time a new worst case elapsed time is found, the script will print out metrics, including user cpu time, system cpu time and context switches.
<?php
declare(ticks = 1);
/*
* This command line PHP script tests algorithm times, keeping track of results in a histogram.
* Each time a new worst case elapsed time is found, the script will print out metrics, including
* user cpu time, system cpu time and context switches.
*
* Pressing Cntrl-Z will dump the current stats.