Module: PhusionPassenger::Rails3Extensions::AnalyticsLogging::ASBenchmarkableExtension

Defined in:
lib/phusion_passenger/rails3_extensions/init.rb

Instance Method Summary collapse

Instance Method Details

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



189
190
191
192
193
194
195
196
197
198
199
200
201
202
# File 'lib/phusion_passenger/rails3_extensions/init.rb', line 189

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