sadgb разумовский
2011-Apr-20 16:44 UTC
[Rails Plugin\Gem] How to show time, which your plugin spent in rails server log
Hi. Sorry for my terrible english. When user makes request to your server in log you could see smth like Completed 200 in 134 ms (Views: 12 ms ; ActiveRecord 1ms; Sphinx 0ms) I want my plugin to show information in this line, such Sphinx and Activerecord and Arel do. But after i waist 2 hours on google i have nothing. Where could i read how to implement this feature ? I really need it in my work -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Apr-20 21:24 UTC
Re: How to show time, which your plugin spent in rails server log
On Apr 20, 5:44 pm, sadgb разумовский <rasum...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi. > Sorry for my terrible english. > When user makes request to your server in log you could see smth like > > Completed 200 in 134 ms (Views: 12 ms ; ActiveRecord 1ms; Sphinx 0ms) > I want my plugin to show information in this line, such Sphinx and > Activerecord and Arel do. > But after i waist 2 hours on google i have nothing. > > Where could i read how to implement this feature ? >Check instrumentation.rb in actionpack - it''s what ActiveRecord hooks into Fred> I really need it in my work-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
sadgb
2011-Apr-21 08:37 UTC
Re: How to show time, which your plugin spent in rails server log
looked up, but no result... maybe you got some sample ? On 21 апр, 01:24, Frederick Cheung <frederick.che...@gmail.com> wrote:> On Apr 20, 5:44 pm, sadgb разумовский <rasum...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi. > > Sorry for my terrible english. > > When user makes request to your server in log you could see smth like > > > Completed 200 in 134 ms (Views: 12 ms ; ActiveRecord 1ms; Sphinx 0ms) > > I want my plugin to show information in this line, such Sphinx and > > Activerecord and Arel do. > > But after i waist 2 hours on google i have nothing. > > > Where could i read how to implement this feature ? > > Check instrumentation.rb in actionpack - it''s what ActiveRecord hooks > into > > Fred > > > > > > > > > I really need it in my work-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Apr-21 09:43 UTC
Re: How to show time, which your plugin spent in rails server log
On Apr 21, 9:37 am, sadgb <rasum...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> looked up, but no result... maybe you got some sample ? >That is the sample - if you look at that file it points you at the bit of activerecord which hooks into that. You should be able to mimic that. Fred>On 21 апр, 01:24, Frederick Cheung <frederick.che...@gmail.com> wrote:> > > > > On Apr 20, 5:44 pm, sadgb разумовский <rasum...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi. > > > Sorry for my terrible english. > > > When user makes request to your server in log you could see smth like > > > > Completed 200 in 134 ms (Views: 12 ms ; ActiveRecord 1ms; Sphinx 0ms) > > > I want my plugin to show information in this line, such Sphinx and > > > Activerecord and Arel do. > > > But after i waist 2 hours on google i have nothing. > > > > Where could i read how to implement this feature ? > > > Check instrumentation.rb in actionpack - it''s what ActiveRecord hooks > > into > > > Fred > > > > I really need it in my work-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.