Sha256: e660f54f9f71b06e57360bd1a971223bf6260134dd83c2708ca354b2a41dc732

Contents?: true

Size: 574 Bytes

Versions: 7

Compression:

Stored size: 574 Bytes

Contents

require 'rforce'

desc 'Perform a crude comparison of the various response parsers'
task :timing do
  fname = File.join(File.dirname(__FILE__), '../spec/soap-response.xml')
  contents = File.open(fname) {|f| f.read}

  [:SoapResponseRexml,
   :SoapResponseExpat,
   :SoapResponseHpricot,
   :SoapResponseNokogiri].each do |name|
    begin
      klass = RForce.const_get name
      started_at = Time.now
      klass.new(contents).parse
      elapsed = Time.now - started_at
      puts "#{klass}: #{elapsed}"
    rescue NameError
      puts $!
      # no-op
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rforce-0.11 tasks/timing.rake
rforce-0.10 tasks/timing.rake
rforce-0.9 tasks/timing.rake
rforce-0.8.1 tasks/timing.rake
rforce-0.8 tasks/timing.rake
rforce-0.7 tasks/timing.rake
rforce-0.6 tasks/timing.rake