Sha256: c47c97563735ce4e8258cdd51cf2d46a423f53b3395b181655c8ee3e3c5ffff9

Contents?: true

Size: 772 Bytes

Versions: 17

Compression:

Stored size: 772 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 TestClass
  def method_1
    trace_execution_scoped(['a', 'b']) do
    end
  end

  def method_2
    callback = Proc.new { ['c', 'd'] }
    trace_execution_scoped(['a', 'b'], { :additional_metrics_callback => callback }) do
    end
  end
end

class TraceExecutionScopedTests < Performance::TestCase
  def setup
    @test_class = TestClass.new
    TestClass.instance_eval('include NewRelic::Agent::MethodTracer')
    require 'new_relic/agent/method_tracer'
  end

  def test_without_callback
    measure { @test_class.method_1 }
  end

  def test_with_callback
    measure { @test_class.method_2 }
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
newrelic_rpm-3.16.0.318 test/performance/suites/trace_execution_scoped.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.2.317/test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.15.2.317 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.15.1.316 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.15.0.314 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.14.3.313 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.14.2.312 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.14.1.311 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.14.0.305 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.13.2.302 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.13.1.300 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.13.0.299 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.12.1.298 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.12.0.288 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.11.2.286 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.11.1.284 test/performance/suites/trace_execution_scoped.rb
newrelic_rpm-3.11.0.283 test/performance/suites/trace_execution_scoped.rb