Skip to content

Instantly share code, notes, and snippets.

@kennyt
Created October 27, 2012 09:42
Show Gist options
  • Save kennyt/3963780 to your computer and use it in GitHub Desktop.
Save kennyt/3963780 to your computer and use it in GitHub Desktop.
06_performance_monitor
def measure number=1, &someproc
start_time = Time.now
number.times {someproc.call}
run_time = (Time.now - start_time) / number
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment