benchmark.rake in appsignal-1.4.0.alpha.2 vs benchmark.rake in appsignal-1.4.0.beta.1
- old
+ new
@@ -1,12 +1,9 @@
+require 'active_support'
require 'appsignal'
require 'benchmark'
-class ::Appsignal::EventFormatter::ActiveRecord::SqlFormatter
- def connection_config; {:adapter => 'mysql'}; end
-end
-
GC.disable
task :default => :'benchmark:all'
namespace :benchmark do
@@ -44,12 +41,11 @@
:action => 'show',
:params => {:id => 1}
)
Appsignal::Transaction.create("transaction_#{i}", Appsignal::Transaction::HTTP_REQUEST, request)
- ActiveSupport::Notifications.instrument('process_action.action_controller') do
- ActiveSupport::Notifications.instrument('sql.active_record', :sql => 'SELECT `users`.* FROM `users`
- WHERE `users`.`id` = ?')
+ Appsignal.instrument('process_action.action_controller') do
+ ActiveSupport::Notifications.instrument('sql.active_record', :sql => 'SELECT `users`.* FROM `users` WHERE `users`.`id` = ?')
10.times do
ActiveSupport::Notifications.instrument('sql.active_record', :sql => 'SELECT `todos`.* FROM `todos` WHERE `todos`.`id` = ?')
end
ActiveSupport::Notifications.instrument('render_template.action_view', :identifier => 'app/views/home/show.html.erb') do