Class: ParserBenchmarkRails

Inherits:
Bullshit::RepeatCase
  • Object
show all
Defined in:
lib/crazy_ivan/vendor/json-1.1.7/benchmarks/parser_benchmark.rb

Instance Method Summary collapse

Instance Method Details

#benchmark_parserObject



160
161
162
# File 'lib/crazy_ivan/vendor/json-1.1.7/benchmarks/parser_benchmark.rb', line 160

def benchmark_parser
  @result = ActiveSupport::JSON.decode(@json)
end

#generic_reset_methodObject



164
165
166
# File 'lib/crazy_ivan/vendor/json-1.1.7/benchmarks/parser_benchmark.rb', line 164

def generic_reset_method
  @result == @big or raise "not equal"
end

#setupObject



154
155
156
157
158
# File 'lib/crazy_ivan/vendor/json-1.1.7/benchmarks/parser_benchmark.rb', line 154

def setup
  a = [ nil, false, true, "fÖß\nÄr", [ "n€st€d", true ], { "fooß" => "bär", "qu\r\nux" => true } ]
  @big = a * 100
  @json = JSON.generate(@big)
end