Class: Parser2BenchmarkYajl

Inherits:
Bullshit::RepeatCase
  • Object
show all
Defined in:
lib/vendor/json_pure/benchmarks/parser2_benchmark.rb

Instance Method Summary collapse

Instance Method Details

#benchmark_parserObject



208
209
210
# File 'lib/vendor/json_pure/benchmarks/parser2_benchmark.rb', line 208

def benchmark_parser
  @result = Yajl::Parser.new.parse(@json)
end

#generic_reset_methodObject



212
213
214
# File 'lib/vendor/json_pure/benchmarks/parser2_benchmark.rb', line 212

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

#setupObject



204
205
206
# File 'lib/vendor/json_pure/benchmarks/parser2_benchmark.rb', line 204

def setup
  @big = @json = File.read(File.join(File.dirname(__FILE__), 'ohai.json'))
end