Sha256: 6aa6e0c74f61ee791a5f2752d4bcf712692fd81b8e8a3bc2774a948f7f2810d7
Contents?: true
Size: 767 Bytes
Versions: 6
Compression:
Stored size: 767 Bytes
Contents
# encoding: utf-8 # This file is distributed under New Relic's license terms. # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details. class StatsHashPerfTest < Performance::TestCase def setup @hash = NewRelic::Agent::StatsHash.new end def test_record(timer) iterations.times do hash = NewRelic::Agent::StatsHash.new timer.measure do 100.times do |i| hash.record("foo#{i}", 1) end end end end def test_merge(timer) iterations.times do incoming = {} 100.times do |i| incoming["foo#{i}"] = NewRelic::Agent::Stats.new end hash = NewRelic::Agent::StatsHash.new timer.measure do hash.merge!(incoming) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems