lib/new_relic/agent/datastores.rb in newrelic_rpm-3.12.1.298 vs lib/new_relic/agent/datastores.rb in newrelic_rpm-3.13.0.299
- old
+ new
@@ -104,10 +104,10 @@
return yield unless operation
metrics = MetricHelper.metrics_for(product, operation, collection)
scoped_metric = metrics.first
NewRelic::Agent::MethodTracer.trace_execution_scoped(metrics) do
- t0 = Time.now
+ t0 = Time.now if callback
begin
result = yield
ensure
if callback
elapsed_time = (Time.now - t0).to_f