-
Notifications
You must be signed in to change notification settings - Fork 10
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
Provide initial implementation #1
Comments
Hello, @DmitryTsepelev! What Do I need to measure? Allocated memory of executed query and builded ActiveRecord::Relation or just calculate fetched data from database using Just, if we execute
we will get all instances of Transaction, not only field amount. and
will get less memory, than first, but same data fetched Currently, i am measuring spent memory for this and also calculates bytes of fetched data. And I don`t know, which way is right Second question. Should I calculate response body only when using render json? Or Have I also think about rendering view case? |
Hi @prog-supdex!
That's right, and
My idea was to start with something simple, so JSON would be enough. The task is a huge enough already 🙂You can also omit some data sources and focus on one or two (e.g., only DB). |
More details on Cult.
We need to implement a module that patches controller actions to measure database and HTTP response payload:
It can help find possible memory bloats earlier. These measurements can be sent to Rails logs or published as notification events. For instance, log could look like this:
The text was updated successfully, but these errors were encountered: