require 'rubygems' require 'hpricot' require 'xaggly' require "rexml/document" require "gruff" fn="run2.xml" fs_a = Hash.new xg_a = Array.new rx_a = Array.new hp_a = Array.new i=0 10.step(100, 10) { |a| print "--------------------------------------------------\n" print "* TEST ##{a}k\n" system("head -n#{a*1000} run.xml > #{fn}") fs=sprintf("%1.1fM",(File.stat(fn).size.to_f/1000000.0).to_f) print "fs ------> #{fs}\n" fs_a[i] = fs st=Time.now.to_f x=Xaggly.new x.open(fn) x.search("/History/Lap/StartTime/*") et=Time.now.to_f-st xg_a< %0.3fs\n",et st=Time.now.to_f doc = open(fn) { |f| Hpricot(f) } doc.search("/History/Lap/StartTime/*") et=Time.now.to_f-st printf "hpricot -> %0.3fs\n",et hp_a< %0.3fs\n",et rx_a<