Sha256: cffc10ac6bcb755da56a102ec143847bd38d7c89cae04c422d20ec5270971b1a

Contents?: true

Size: 534 Bytes

Versions: 10

Compression:

Stored size: 534 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].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
      # no-op
    end
  end
end

Version data entries

10 entries across 10 versions & 5 rubygems

Version Path
rforcedotcom-20.0.0 tasks/timing.rake
rforce-0.5.1 tasks/timing.rake
aq1018-rforce-0.5.2 tasks/timing.rake
rforce-0.5 tasks/timing.rake
aq1018-rforce-0.5.1 tasks/timing.rake
DerGuteMoritz-rforce-0.4.2 tasks/timing.rake
rforce-raygao-1.0.0 tasks/timing.rake
rforce-0.4.1 tasks/timing.rake
rforce-0.4 tasks/timing.rake
rforce-0.3 tasks/timing.rake