Yes I know the version is ancient -- I'm stuck with it for various
boring reasons we need not go into here.

I have a ruby program that processes logs on an hourly basis for lots
(hundreds) of machines.  I want to find out which machines are taking
all the time so I reached for benchmark:

    if  $options['time-hosts']
        $log_store.traverse do | dir_name, mach|
           t = Benchmark.measure(mach) { process_host( dir_name, mach )
}
           puts " >>>#{t}<<<"
        end
    end

the puts never gets executed.

I also did a version with bm() do |x|
immediately after the first if and x.report(mach) {}

produced machinename1:       machine2:   ......

I have managed to get measure to behave in simple irb trial.   Is there
anything that I must not do in the code that is being benchmarked?

Thanks, Russell

-- 
Posted via http://www.ruby-forum.com/.