Skip to content
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

What cannot be measured, cannot be improved. #73

Open
GersonMontesinos opened this issue Sep 23, 2021 · 4 comments · May be fixed by #120
Open

What cannot be measured, cannot be improved. #73

GersonMontesinos opened this issue Sep 23, 2021 · 4 comments · May be fixed by #120
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest improvements Work in a better way with improvements

Comments

@GersonMontesinos
Copy link
Contributor

Bottlenecks and overloading have become a part of the API due to the fact that we currently do not have any tools or ways to identify the amount of memory or resources required to execute the API's endpoints. We would like to implement and use these tools so that we make sure that whenever we upload more code or functionalities, these won't cause any trouble.

@GersonMontesinos GersonMontesinos added enhancement New feature or request good first issue Good for newcomers improvements Work in a better way with improvements labels Sep 23, 2021
@Javiercerna
Copy link

Is this what you have in mind? You can inspect the queries and profile the code for each of your endpoints

image
image
image

@GersonMontesinos
Copy link
Contributor Author

Hey @Javiercerna. Yes but I was hoping that there would be a better tool. That's sort of what I get with the middleware on my terminal whenever I execute a query and run the API locally. How do you get that UI or how do you set it up though? It's way better than the printed one from the terminal and I would love to use it

@Javiercerna
Copy link

Javiercerna commented Oct 6, 2021

It's flask-debugtoolbar, although with a small change, as noted here: pallets-eco/flask-debugtoolbar#89. Normally it only works for valid HTML responses (it searches for a <body> tag) and you are returning JSON from most of your endpoints, but it's not difficult to adapt.

I'll open a draft PR later because I might have one or two questions regarding your setup in production (the toolbar should be disabled in production and only work in debug mode).

Could you please tag this issue with the hacktoberfest label? I would like it to count as one of my contributions 😃

@GersonMontesinos
Copy link
Contributor Author

Thanks for your interest @Javiercerna, I'll be looking forward to any questions you have and I'll gladly try to answer them 😄

@Javiercerna Javiercerna linked a pull request Oct 6, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest improvements Work in a better way with improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants