Sha256: e1094bf30867ab61d910a0bab0b43c96456858187bce9a4be8046a02fc6f417b
Contents?: true
Size: 1.01 KB
Versions: 5
Compression:
Stored size: 1.01 KB
Contents
require 'benchmark' require 'active_support/all' { :test => :a }.to_json n = 50_000 Benchmark.bm do |benchmark| benchmark.report "hash tracking" do @trackings = [] 0.upto(n) do @trackings << { :elapsed => 0.23465723, :start => 1273651762534712, :stop => 1273658172365915, :duration => 23, :benchmark => "Some value", :url => "http://localhost:3000", :path => "/", :method => "GET", :status => 200 } end end benchmark.report "hash-to_json tracking" do @trackings = [] 0.upto(n) do @trackings << { :elapsed => 0.23465723, :start => 1273651762534712, :stop => 1273658172365915, :duration => 23, :benchmark => "Some value", :url => "http://localhost:3000", :path => "/", :method => "GET", :status => 200 }.to_json end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
bigbench-0.0.6 | dev/tracking.rb |
bigbench-0.0.5 | dev/tracking.rb |
bigbench-0.0.4 | dev/tracking.rb |
bigbench-0.0.3 | dev/tracking.rb |
bigbench-0.0.2 | dev/tracking.rb |