Class: ParserBenchmarkYAML
- Defined in:
- lib/vendor/json_pure/benchmarks/parser_benchmark.rb
Instance Method Summary collapse
Instance Method Details
#benchmark_parser ⇒ Object
142 143 144 |
# File 'lib/vendor/json_pure/benchmarks/parser_benchmark.rb', line 142 def benchmark_parser @result = YAML.load(@json) end |
#generic_reset_method ⇒ Object
146 147 148 |
# File 'lib/vendor/json_pure/benchmarks/parser_benchmark.rb', line 146 def generic_reset_method @result == @big or raise "not equal" end |
#setup ⇒ Object
136 137 138 139 140 |
# File 'lib/vendor/json_pure/benchmarks/parser_benchmark.rb', line 136 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 |