Sha256: 95266c3b4a7c19531ba2372b0e52e73cdbe8f3caafd02748aafa637ecbb0e2c0

Contents?: true

Size: 1.33 KB

Versions: 96

Compression:

Stored size: 1.33 KB

Contents

require "rubygems"
require "bundler/setup"
require "recurly"
require "benchmark"

N = 1_000

account_body = "{\"id\":\"ljvmmbjchtgs\",\"object\":\"account\",\"code\":\"9ebd49f7288@example.com\",\"parent_account_id\":null,\"bill_to\":\"self\",\"state\":\"active\",\"username\":null,\"email\":null,\"cc_emails\":null,\"preferred_locale\":null,\"first_name\":\"Benjamin\",\"last_name\":\"Du Monde\",\"company\":null,\"vat_number\":null,\"tax_exempt\":false,\"exemption_certificate\":null,\"address\":null,\"billing_info\":null,\"shipping_addresses\":[{\"object\":\"shipping_address\",\"first_name\":\"Benjamin\",\"last_name\":\"Du Monde\",\"company\":null,\"phone\":null,\"street1\":\"1 Tchoupitoulas St\",\"street2\":null,\"city\":\"New Orleans\",\"region\":\"LA\",\"postal_code\":\"70115\",\"country\":\"US\",\"nickname\":\"Home\",\"email\":null,\"vat_number\":null,\"id\":\"ljvmmbk9e1as\",\"account_id\":\"ljvmmbjchtgs\",\"created_at\":\"2019-09-19T22:45:59Z\",\"updated_at\":\"2019-09-19T22:45:59Z\"}],\"custom_fields\":[],\"hosted_login_token\":\"PSvcHow5H4HGEGKTfHXadLNoDcRaDVMK\",\"created_at\":\"2019-09-19T22:45:59Z\",\"updated_at\":\"2019-09-19T22:45:59Z\",\"deleted_at\":null}"

Benchmark.bm do |benchmark|
  benchmark.report("JSON parsing and casting\n") do
    N.times do
      _account = Recurly::JSONParser.parse(nil, account_body)
    end
  end
end

Version data entries

96 entries across 96 versions & 1 rubygems

Version Path
recurly-4.37.0 benchmark.rb
recurly-3.28.0 benchmark.rb
recurly-4.36.0 benchmark.rb
recurly-4.35.0 benchmark.rb
recurly-3.27.0 benchmark.rb
recurly-4.34.0 benchmark.rb
recurly-3.26.0 benchmark.rb
recurly-4.33.0 benchmark.rb
recurly-4.32.0 benchmark.rb
recurly-4.31.0 benchmark.rb
recurly-4.30.0 benchmark.rb
recurly-4.29.0 benchmark.rb
recurly-3.25.0 benchmark.rb
recurly-4.28.0 benchmark.rb
recurly-4.27.0 benchmark.rb
recurly-3.24.0 benchmark.rb
recurly-3.23.0 benchmark.rb
recurly-4.26.0 benchmark.rb
recurly-4.25.0 benchmark.rb
recurly-4.24.0 benchmark.rb