Skip to content

Instantly share code, notes, and snippets.

@alvin2ye
Created April 9, 2010 08:49
Show Gist options
  • Select an option

  • Save alvin2ye/361001 to your computer and use it in GitHub Desktop.

Select an option

Save alvin2ye/361001 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'benchmark'
def method_1
`curl -s #{ARGV.first} | echo`
end
10.times do |i|
sleep 1
elapsed_time = Benchmark.realtime do
method_1
end
puts "#{i}: #{elapsed_time}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment