Module: PhusionPassenger::ClassicRailsExtensions::AnalyticsLogging::AVBenchmarkHelperExtension

Defined in:
lib/phusion_passenger/classic_rails_extensions/analytics_logging/av_benchmark_helper_extension.rb

Instance Method Summary collapse

Instance Method Details

#benchmark_with_passenger(message = "Benchmarking", *args) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/phusion_passenger/classic_rails_extensions/analytics_logging/av_benchmark_helper_extension.rb', line 29

def benchmark_with_passenger(message = "Benchmarking", *args)
	log = request.env[PASSENGER_ANALYTICS_WEB_LOG]
	if log
		log.measure("BENCHMARK: #{message}") do
			benchmark_without_passenger(message, *args) do |*args2|
				yield(*args2)
			end
		end
	else
		benchmark_without_passenger(message, *args) do |*args2|
			yield(*args2)
		end
	end
end