| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
It's not defined on JRuby and unlike monotonic time, concurrent-ruby doesn't have an cross-platform abstraction for this.
|
|
|
|
|
|
|
| |
We don't need to have a special subscribe method for objects. The
regular `subscribe` method is more expensive than a specialized method,
but `subscribe` should not be called frequently. If that turns out to
be a hotspot, we can introduce a specialized method. :)
|
|
|
|
|
|
| |
Fanout notifier can send event objects to subscribers now. Also moved
`end` lower in the `finish!` method to guarantee that CPU time is
shorter than real time.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use process clock instead of Time.now
This fixes any issues with the system clock changing and also eliminates
2 object allocations per event.
* Add start! and finish! methods to the event object so we can record
more information
* Adds cpu time, idle time, and allocation count for a particular event.
Co-authored-by: Aaron Patterson <aaron.patterson@gmail.com>
|
| |
|
| |
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
|
|
|
| |
- Adds new key/value pair to payload when an exception is raised
e.g. `:exception_object=> #<RuntimeError: FAIL>`
- Updates relevant test
- Adds CHANGELOG entry
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The issue is that on the exit from Instrumenter#instrument section,
an Evented listener will run into an error because its thread local
(Thread.current[:_timestack]) has not been set up by the #start
method (this obviously happens because the Evented listeners didn't
exist at the time, since no subscribtion to that section was made yet).
Note: support for subscribing to instrumented sections, while being
inside those instrumented sections, might be removed in the future.
Maybe fixes #21873.
|
|
|
|
|
|
|
|
| |
@rafaelfranca suggested in f7c7bcd9 that code examples should display
the result after `# =>` and not after `#=>`.
This commit replaces *all* the occurrences of `#=>` in the code documentation
(mostly added by me :sob:) with the suggested `# =>`.
|
|
|
|
|
|
|
|
|
| |
Stems from comments by @zzak on e07f3dd:
* https://github.com/rails/docrails/commit/e07f3ddcac394d2a8dc23fc571318b7e8c2497b1#commitcomment-9015634
* https://github.com/rails/docrails/commit/e07f3ddcac394d2a8dc23fc571318b7e8c2497b1#commitcomment-9015639
[ci skip]
|
|
|
|
| |
[ci skip]
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
activerecord/test/cases/adapter_test.rb
guides/source/testing.md
[ci skip]
|
| | |
|
|/
|
|
| |
its payload the same way that ActiveSupport::Notifications does.
Fix spelling in test name.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Refactor log subscriber, use select! to avoid a new object
* Remove deprecation messages related to AS::Deprecation behavior
This was added about 2 years ago for Rails 3:
https://github.com/rails/rails/commit/d4c7d3fd94e5a885a6366eaeb3b908bb58ffd4db
* Remove some not used requires
* Refactor delegate to avoid string conversions and if statements inside each block
|
|
|
|
| |
standard library. (It has been deprecated in the 3-1-stable branch.)
|
|
|
|
|
|
| |
* 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;
|
| |
|
| |
|
|
|
|
| |
listened to. Also, fix a possible concurrency issue.
|
| |
|
|
|
|
| |
Benchmark. [#5098 state:open]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
| |
result).
|
| |
|
| |
|
| |
|
|
|
|
| |
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.
|
|
implementation, and segregate instrumentation concerns
|