Skip to content

Instantly share code, notes, and snippets.

@tamakiii
Last active October 20, 2015 17:45
Show Gist options
  • Save tamakiii/49614d05380df2d98e74 to your computer and use it in GitHub Desktop.
Save tamakiii/49614d05380df2d98e74 to your computer and use it in GitHub Desktop.
#!/bin/sh
run() {
number=$1
shift
for i in `seq $number`; do
START=$(gdate +%s.%N)
$@
END=$(gdate +%s.%N)
echo "$END - $START" | bc
done
}
run 100 php ~/tmp/php/compare.php ~/tmp/php/file/365.csv
run 100 php ~/tmp/php/compare_yield.php ~/tmp/php/file/365.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment