Just another note, I figured out how to test the load speed hopefully.
Ruby already includes a benchmarking class:
http://ruby-doc.org/core/classes/Benchmark.htmlHeres my script:
This script also tests a browser refresh so you can take it from there.
#!/usr/bin/ruby
#
#
require "rubygems"
require "benchmark"
require "firewatir"
include FireWatir
ff=Firefox.new
puts "Testing load time on textfiles.com"
puts Benchmark.measure {ff.goto("
http://textfiles.com")}
puts "testing refresh time"
puts Benchmark.measure {ff.refresh}
puts "Lets time google.com"
puts Benchmark.measure {ff.goto("
http://google.com")}
puts "and lets see if google loads faster 2nd time"
puts Benchmark.measure {ff.goto("
http://google.com")}
ff.close
and this is the output i got:
$ ./timer.rb
Testing load time on textfiles.com
0.000000 0.000000 0.000000 ( 0.723822)
testing refresh time
0.010000 0.000000 0.010000 ( 7.643350)
Lets time google.com
0.000000 0.010000 0.010000 ( 2.553141)
and lets see if google loads faster 2nd time
0.030000 0.000000 0.030000 ( 31.678997)
^^ for the record..... yes... that last result was 31 seconds, wifi...