Sha256: bed25c3cd9b65727954ee492b707845087a6e566104165bc825f0e3063fce4a3
Contents?: true
Size: 698 Bytes
Versions: 1
Compression:
Stored size: 698 Bytes
Contents
require File.dirname(__FILE__) << "/test_helper" require 'zlib' class JsonTest < Test::Unit::TestCase def profile(name, &block) require 'ruby-prof' result = RubyProf.profile(&block) printer = RubyProf::GraphHtmlPrinter.new(result) File.open("#{name}.html", 'w') do |f| printer.print(f, :min_percent=>1) end end def xprofile(name, &block) block.call end def setup File.open("#{File.dirname(__FILE__)}/data_payload.bin.gz") do |f| @data = eval(Zlib::GzipReader.new(f).read) end end def test_serialization xprofile('fjson') do @data.to_fjson end a = Time.now fjson = @data.to_fjson # puts "FJSON: #{Time.now - a}" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fiveruns-dash-ruby-0.8.4 | test/json_test.rb |