Module: GeneratorBenchmarkCommon
- Includes:
- JSON
- Included in:
- GeneratorBenchmarkRails, GeneratorBenchmarkYajl, JSONGeneratorCommon
- Defined in:
- lib/vendor/json_pure/benchmarks/generator_benchmark.rb
Constant Summary
Constants included from JSON
JSON::Infinity, JSON::JSON_LOADED, JSON::MAP, JSON::MinusInfinity, JSON::NaN, JSON::UnparserError, JSON::VERSION, JSON::VERSION_ARRAY, JSON::VERSION_BUILD, JSON::VERSION_MAJOR, JSON::VERSION_MINOR
Instance Method Summary collapse
Methods included from JSON
[], deep_const_get, dump, fast_generate, generate, iconv, load, parse, parse!, pretty_generate, recurse_proc, swap!, utf8_to_json, utf8_to_json_ascii
Instance Method Details
#generic_reset_method ⇒ Object
34 35 36 |
# File 'lib/vendor/json_pure/benchmarks/generator_benchmark.rb', line 34 def generic_reset_method @result and @result.size > 2 + 6 * @big.size or raise @result.to_s end |
#setup ⇒ Object
28 29 30 31 32 |
# File 'lib/vendor/json_pure/benchmarks/generator_benchmark.rb', line 28 def setup a = [ nil, false, true, "fÖßÄr", [ "n€st€d", true ], { "fooß" => "bär", "quux" => true } ] puts a.to_json if a.respond_to?(:to_json) @big = a * 100 end |