File tree 8 files changed +45
-9
lines changed
8 files changed +45
-9
lines changed Original file line number Diff line number Diff line change 13
13
= @report.id
14
14
span .duration-ms = "% 4.1fms" % (@report.duration * 1000.0)
15
15
. tabs
16
- a .tab-sources (href =" #sources" ) Sources
17
16
a .tab-events (href =" #events" ) Events
17
+ a .tab-sources (href =" #sources" ) Sources
18
18
19
19
# details
20
+ # events .active
21
+ == partial('events', locals: { events: @events })
22
+
20
23
# sources
21
24
# source-list
22
25
- @report.sources.each do |source|
52
55
- source.lines.each do |line|
53
56
. line-code (id =" line-code-#{ line_id(source.file, line.line)} " )= line.code
54
57
55
- # events .active
56
- == partial('events', locals: { events: @events })
57
-
Original file line number Diff line number Diff line change 3
3
4
4
class SpeedGun ::Profiler ::ActionControllerProfiler < SpeedGun ::Profiler ::ActiveSupportNotificatiosProfiler
5
5
subscribe (
6
- %r{^(process_action|send_file|send_data|redirect_to) \. action_controller$} ,
6
+ %r{\. action_controller$} ,
7
7
[ :request ]
8
8
)
9
9
end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+ require 'speed_gun/profiler/active_support_notifications_profiler'
3
+
4
+ class SpeedGun ::Profiler ::ActionMailerProfiler < SpeedGun ::Profiler ::ActiveSupportNotificatiosProfiler
5
+ subscribe %r{\. action_mailer$}
6
+ end
7
+
Original file line number Diff line number Diff line change 2
2
require 'speed_gun/profiler/active_support_notifications_profiler'
3
3
4
4
class SpeedGun ::Profiler ::ActionViewProfiler < SpeedGun ::Profiler ::ActiveSupportNotificatiosProfiler
5
- subscribe %r{^!(render_template|render_partial) \. action_view$}
5
+ subscribe %r{\. action_view$}
6
6
end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+ require 'speed_gun/profiler/active_support_notifications_profiler'
3
+
4
+ class SpeedGun ::Profiler ::ActiveJobProfiler < SpeedGun ::Profiler ::ActiveSupportNotificatiosProfiler
5
+ subscribe %r{\. active_job$}
6
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+ require 'speed_gun/profiler/active_support_notifications_profiler'
3
+
4
+ class SpeedGun ::Profiler ::ActiveSupportProfiler < SpeedGun ::Profiler ::ActiveSupportNotificatiosProfiler
5
+ subscribe %r{\. active_support$}
6
+ end
7
+
8
+
Original file line number Diff line number Diff line change @@ -11,9 +11,12 @@ class SpeedGun::Railtie < ::Rails::Railtie
11
11
SpeedGun . configure do |config |
12
12
config . logger = Rails . logger
13
13
config . store = SpeedGun ::Store ::FileStore . new ( Rails . root . join ( 'tmp/speed_gun' ) . to_s )
14
+ config . lineprof_paths . push ( Rails . root . to_s )
14
15
config . skip_paths . push ( app . config . assets . prefix )
15
16
end
16
17
18
+ require 'speed_gun/profiler/active_support_profiler'
19
+
17
20
ActiveSupport . on_load ( :action_controller ) do
18
21
require 'speed_gun/profiler/action_controller_profiler'
19
22
end
@@ -25,5 +28,13 @@ class SpeedGun::Railtie < ::Rails::Railtie
25
28
ActiveSupport . on_load ( :active_record ) do
26
29
require 'speed_gun/profiler/active_record_profiler'
27
30
end
31
+
32
+ ActiveSupport . on_load ( :action_mailer ) do
33
+ require 'speed_gun/profiler/action_mailer_profiler'
34
+ end
35
+
36
+ ActiveSupport . on_load ( :active_job ) do
37
+ require 'speed_gun/profiler/active_job_profiler'
38
+ end
28
39
end
29
40
end
Original file line number Diff line number Diff line change @@ -20,10 +20,14 @@ Gem::Specification.new do |spec|
20
20
spec . executables = spec . files . grep ( %r{^exe/} ) { |f | File . basename ( f ) }
21
21
spec . require_paths = [ 'lib' ]
22
22
23
- spec . add_dependency 'semantic'
24
- spec . add_dependency 'rblineprof'
25
- spec . add_dependency 'rack'
26
23
spec . add_dependency 'msgpack'
24
+ spec . add_dependency 'rack'
25
+ spec . add_dependency 'rblineprof'
26
+ spec . add_dependency 'sass'
27
+ spec . add_dependency 'semantic'
28
+ spec . add_dependency 'sinatra'
29
+ spec . add_dependency 'sinatra-partial'
30
+ spec . add_dependency 'slim'
27
31
28
32
spec . add_development_dependency 'bundler' , '~> 1.12'
29
33
spec . add_development_dependency 'rake' , '~> 11.0'
You can’t perform that action at this time.
0 commit comments