Sha256: e88811872c9db977b05f3d4e3a4c3aab8985fa4787ca84e8c954fd692bcdbc57

Contents?: true

Size: 548 Bytes

Versions: 113

Compression:

Stored size: 548 Bytes

Contents

#!/usr/bin/env ruby

require 'bullshit'
require 'active_support'

class BC_Rails < Bullshit::TimeCase
  warmup    true
  duration  10

  def setup
    a = [ nil, false, true, "fÖßÄr", [ "n€st€d", true ], { "fooß" => "bär", "quux" => true } ]
    puts a.to_json
    @big = a * 100
  end

  def benchmark_generator
    @result = @big.to_json
  end

  def reset_benchmark_generator
    @result and @result.size > 2 + 6 * @big.size or raise @result.to_s
    if stack = Thread.current[:json_reference_stack]
      stack.clear
    end
  end
end

Version data entries

113 entries across 107 versions & 14 rubygems

Version Path
relevance-castronaut-0.5.2 vendor/json/benchmarks/benchmark_rails.rb
relevance-castronaut-0.5.3 vendor/json/benchmarks/benchmark_rails.rb
relevance-castronaut-0.5.4 vendor/json/benchmarks/benchmark_rails.rb
relevance-castronaut-0.6.0 vendor/json/benchmarks/benchmark_rails.rb
relevance-castronaut-0.6.1 vendor/json/benchmarks/benchmark_rails.rb
relevance-castronaut-0.7.4 vendor/json/benchmarks/benchmark_rails.rb
relevance-castronaut-0.7.5 vendor/json/benchmarks/benchmark_rails.rb
nbudin-castronaut-0.7.5 vendor/json/benchmarks/benchmark_rails.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/json_pure-1.1.3/benchmarks/benchmark_rails.rb
merb-core-1.1.3 spec10/public/core_ext/fixtures/gems/gems/json_pure-1.1.3/benchmarks/benchmark_rails.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/json_pure-1.1.3/benchmarks/benchmark_rails.rb
merb-core-1.1.2 spec10/public/core_ext/fixtures/gems/gems/json_pure-1.1.3/benchmarks/benchmark_rails.rb
merb-core-1.1.1 spec10/public/core_ext/fixtures/gems/gems/json_pure-1.1.3/benchmarks/benchmark_rails.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/json_pure-1.1.3/benchmarks/benchmark_rails.rb
poolparty-1.6.9 vendor/gems/json/benchmarks/benchmark_rails.rb
poolparty-1.6.8 vendor/gems/json/benchmarks/benchmark_rails.rb
poolparty-1.6.7 vendor/gems/json/benchmarks/benchmark_rails.rb
poolparty-1.6.6 vendor/gems/json/benchmarks/benchmark_rails.rb
merb-core-1.1.0 spec10/public/core_ext/fixtures/gems/gems/json_pure-1.1.3/benchmarks/benchmark_rails.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/json_pure-1.1.3/benchmarks/benchmark_rails.rb