Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Dominy rdominy

  • Sincro
  • Mendocino, CA
View GitHub Profile
@rdominy
rdominy / timingtest.php
Created Sep 13, 2013
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.
View timingtest.php
<?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.