-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inject :connection to sql.active_record event instead of using #_id2ref #649
Conversation
I created a pretty simple performance_spec.txt which runs Control commit
Use of
Using iterative strategy, by searching connections in the connection pool in #647 commit
We should probably look at more qualitative differences to determine what's the best strategy, and see if there's something we can do to bring performance closer to the control. |
Lookin at the benchmarks I'm s leaning a bit more towards the solution that uses the object proxy/shim. As it seems to me to be a bit more versatile. |
Cool. Need to rebase this on the shim PR then after I add specs there, then I'll wrap this one up. |
58b4f19
to
134b3a9
Compare
9e12665
to
6c3554c
Compare
As an alternative implementation to #647, this adds
:connection
to Railssql.active_record
event, then uses that object to derive connection configuration for the trace. To accomplish this, it leverages #648 to add aDatadog::Shim::Double
into theAbstractAdapter
class.:connection
has recently been added to Rails master via rails/rails#34602. The behavior in this PR is for the benefit of Rails versions preceding that change on Rails.TODO
:connection
to ActiveRecord event:connection