Jon Leighton
1170cceaae
Removed ActiveSupport::SecureRandom in favour of SecureRandom from the standard library. (It has been deprecated in the 3-1-stable branch.)
2011-05-23 20:25:44 +01:00
José Valim
ff0d842454
Revert the previous three commits.
...
* AS::Notifications#instrument should not measure anything, it is not its responsibility;
* Adding another argument to AS::Notifications#instrument API needs to be properly discussed;
2010-07-25 20:46:42 +02:00
Aaron Patterson
b7e0408ca9
use a hash to collect optional statistics about the instrumentation
2010-07-25 11:11:23 -07:00
José Valim
834bd23a07
Get rid of instrumenter.elapsed.
2010-07-24 10:22:22 +02:00
Carlhuda
ba8d89c4c8
Performance optimizations to handle cases of instrumentors that are not listened to. Also, fix a possible concurrency issue.
2010-07-22 11:36:16 -07:00
José Valim
9df9c4bac0
Add a test for elapsed and require missing benchmark file.
2010-07-20 17:07:18 +02:00
Aaron Patterson
202fb79e86
reusing the time instrumentation from the instrumenter rather than Benchmark. [ #5098 state:open]
2010-07-19 13:44:11 -07:00
Aaron Patterson
cfca55949f
convert duration to an attr_reader
2010-07-17 16:03:56 -07:00
José Valim
a76c7e68d5
Event should be aware if yielded block failed or not.
2010-05-02 22:45:54 +02:00
Justin George
109d3ee38d
Make notifications go off even when an error is raised, so that we capture the underlying performance data [ #4505 state:resolved]
...
This is important when trying to keep track of many layers of interrelated calls
i.e.:
ActiveRecord::Base.transaction do
MyModel.find(1) #ActiveRecord::NotFound
end # should capture the full time until the error propagation
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-02 22:45:53 +02:00
José Valim
31248fe369
Remove instrument! and require thread from AS::Notifications.
2010-02-04 10:39:55 +01:00
José Valim
0334f9f6cf
Add ActionDispatch::Notifications middleware.
2010-01-17 11:29:51 +01:00
José Valim
7f4d8e3fbd
Yield the payload notifications for further modification (like adding the result).
2010-01-15 12:24:31 +01:00
José Valim
7c3573f327
Add instrument! to notifications which adds the result to the payload.
2010-01-14 01:07:03 +01:00
José Valim
4704af763f
Do not send notifications when instrumentation raise an error.
2010-01-13 01:19:22 +01:00
José Valim
45462c5e41
Expose Instrumenter id in Notifications.
2010-01-04 23:05:28 +01:00
José Valim
75ba102a80
Remove ActionView inline logging to ActiveSupport::Notifications and create ActionController::Base#log_event, so everything can be logged within one listener. Also expose log_process_action as a hook for different modules to include their own information during the action processing. This allow ActiveRecord to hook and any other ORM. Finally, this commit changes 'Processing' and 'Rendering' in logs to 'Processed' and 'Rendered' because at the point it's logged, everying already happened.
2009-12-26 20:28:53 +01:00
Jeremy Kemper
4f2a04cc08
Notifications: extract central Notifier, cordon off the internal Fanout implementation, and segregate instrumentation concerns
2009-11-28 12:50:09 -08:00