| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
We sometimes say "✂️ newline after `private`" in a code review (e.g.
https://github.com/rails/rails/pull/18546#discussion_r23188776,
https://github.com/rails/rails/pull/34832#discussion_r244847195).
Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style
`EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059).
That cop and enforced style will reduce the our code review cost.
|
|
|
|
|
|
|
| |
This is a regression for #36184.
And also, add new `monotonic` argument to the last of the method
signature rather than the first.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'ActiveSupport::Notifications::Fanout::Subscribers::MonotonicTimed' and 'ActiveSupport::Notifications::monotonic_subscribe'
Also, change the signature of ‘ActiveSupport::Notifications::Fanout#subscribe’ to accept optional ‘monotonic’ boolean argument. Then initialize either a ‘Timed’ or ‘MonotonicTimed’ subscriber based on the value of ‘monotonic’ parameter.
Introduce ‘ActiveSupport::Notifications::monotonic_subscribe’ method
Also, provision ‘ActiveSupport::Notifications::subscribed’ to optionally accept ‘monotonic’ boolean argument.
Update documentation for ActiveSupport::Notifications
Add tests
Update guides documentation under the 'Active Support Instrumentation' chapter
Incorporate feedback: use optional keyword argument to specify optional 'monotonic' option to 'subscribed' method
Fix a typo
|
|
|
|
|
|
|
|
|
|
| |
The change to monotonic times causes failures for applications
where the subscribed block is expecting Time objects as described
in this issue: https://github.com/rails/rails/issues/36145
The original PR (https://github.com/rails/rails/pull/35984) was
concerned with errors on the cpu_time. Test was edited to reflect
changes to initializer using 0 values instead of nil
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Extend documentation of `ActiveSupport::Notifications.subscribe`
Add mention that a block with only one argument passed to the method
will yield an event object.
Related to #33451
* Emphasize that `SubscribeEventObjects` is a test class by adding suffix `Test`
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This autocorrects the violations after adding a custom cop in
3305c78dcd.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
its payload the same way that ActiveSupport::Notifications does.
Fix spelling in test name.
|
| |
|
|
|
|
| |
events while a block runs
|
| |
|
|
|
|
| |
and require 'securerandom' from the stdlib when active support is required.
|
| |
|
|
|
|
|
|
| |
* 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;
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
representation of this values aren't equal
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
| |
|
|
|
|
| |
run them. This will allow notifications that are only useful in dev or testing to run efficiently in production.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
result).
|