Class: Generator2BenchmarkYajl
- Inherits:
-
Bullshit::RepeatCase
- Object
- Bullshit::RepeatCase
- Generator2BenchmarkYajl
show all
- Includes:
- Generator2BenchmarkCommon
- Defined in:
- lib/vendor/json_pure/benchmarks/generator2_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
#generic_reset_method, #setup
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
#benchmark_generator ⇒ Object
171
172
173
174
175
|
# File 'lib/vendor/json_pure/benchmarks/generator2_benchmark.rb', line 171
def benchmark_generator
output = StringIO.new
Yajl::Encoder.new.encode(@big, output)
@result = output.string
end
|
#benchmark_generator_gem_api ⇒ Object
177
178
179
|
# File 'lib/vendor/json_pure/benchmarks/generator2_benchmark.rb', line 177
def benchmark_generator_gem_api
@result = @big.to_json
end
|
#reset_benchmark_generator ⇒ Object
181
182
183
|
# File 'lib/vendor/json_pure/benchmarks/generator2_benchmark.rb', line 181
def reset_benchmark_generator
generic_reset_method
end
|