Class: ParserBenchmarkYAML
- Defined in:
- lib/crazy_ivan/vendor/json-1.1.7/benchmarks/parser_benchmark.rb
Instance Method Summary collapse
Instance Method Details
#benchmark_parser ⇒ Object
124 125 126 |
# File 'lib/crazy_ivan/vendor/json-1.1.7/benchmarks/parser_benchmark.rb', line 124 def benchmark_parser @result = YAML.load(@json) end |
#generic_reset_method ⇒ Object
128 129 130 |
# File 'lib/crazy_ivan/vendor/json-1.1.7/benchmarks/parser_benchmark.rb', line 128 def generic_reset_method @result == @big or raise "not equal" end |
#setup ⇒ Object
118 119 120 121 122 |
# File 'lib/crazy_ivan/vendor/json-1.1.7/benchmarks/parser_benchmark.rb', line 118 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.pretty_generate(@big) end |