author | Stefan Vogel <sv@exept.de> |
Fri, 17 May 2019 16:56:31 +0200 | |
branch | cvs_MAIN |
changeset 3899 | 3c0aea90b463 |
parent 2678 | c865275e48a7 |
child 2731 | 13f5be2bf83b |
permissions | -rwxr-xr-x |
#!/usr/bin/env ruby require 'benchmark' class MethodInvocation def do_smth self end end results = Benchmark.bmbm do |bm| raise "Expecting one arg - num of invocations" if ARGV.size == 0 n = ARGV[0].to_i inst = MethodInvocation.new bm.report do n.times { inst.do_smth } end end puts "EXECUTION TIME: #{results[0].real * 1000.0}"