Nice function to throw in your irb shell:
def stat_analyze(n = 100)
times = []
n.times { t = Time.now; yield; times << Time.now - t}
times.sum / times.count
end
Nice function to throw in your irb shell:
def stat_analyze(n = 100)
times = []
n.times { t = Time.now; yield; times << Time.now - t}
times.sum / times.count
end