Class: ParserBenchmarkRails
- Defined in:
- lib/crazy_ivan/vendor/json-1.1.7/benchmarks/parser_benchmark.rb
Instance Method Summary collapse
Instance Method Details
#benchmark_parser ⇒ Object
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_method ⇒ Object
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 |
#setup ⇒ Object
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 |