-
Notifications
You must be signed in to change notification settings - Fork 650
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
Bring profiler to 2020 #15691
Bring profiler to 2020 #15691
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
LGTM. I'm building this locally to test, but I understand that if I do a request with the Pinging @alasarr since we was also thinking on using this and it might be really useful now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and it looks good.
There is an issue though. Altough it's not beeing used, it still requires the directory to exist in the server, and if it doesn't it returns a 500 error.
Since the callgrind traces are sent in the body of the request, there's no need to create a directory to save callgrind traces in the filesystem. Remove code that created that directory and failed if the parent did not exist, producing a 500 error.
good catch, fixing it straight away! |
PS: wiki page updated as well. |
A couple of light touches to the best tool under my belt to profile slow ruby code.
Amazed it almost worked out of the box 5 years later.
The biggest change is returning the profile trace as the request payload, instead of making you look it up in rui servers in production.
See this wiki page (I know, update pending): https://github.com/CartoDB/cartodb-management/wiki/Profiling-rails
cc/ @CartoDB/backend-team FWIW
have a nice 🐸 time!