-
Couldn't load subscription status.
- Fork 171
profiler: Add blueprint and template #3199
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
base: master
Are you sure you want to change the base?
profiler: Add blueprint and template #3199
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.
@slint anything against in adding this to InvenioRDM?
invenio_app_rdm/profiler.py
Outdated
| app.config.setdefault("PROFILER_ACTIVE_SESSION_LIFETIME", timedelta(minutes=60)) | ||
| app.config.setdefault("PROFILER_ACTIVE_SESSION_REFRESH", timedelta(minutes=30)) | ||
| app.config.setdefault("PROFILER_IGNORED_ENDPOINTS", ["static", r"profiler\..+"]) | ||
| app.config.setdefault("PROFILER_PERMISSION", lambda: True) |
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.
Please restrict it to super admins only! I recommend comparing the config in Zenodo.
setup.cfg
Outdated
| invenio-pages>=7.0.0,<8.0.0 | ||
| invenio-audit-logs>=0.3.0,<1.0.0 | ||
| invenio-sitemap>=0.1.0,<2.0.0 | ||
| pyinstrument>=5.0.0,<6 |
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.
Shall we make this optional instead? If yes, the imports in the profiler should take that into account.
I would propose to have a feature flag for this, so by default it is not actived.
|
Oof, this is awkward 😅 I also extracted this in its own module since I wanted to add this back in InvenioRDM and also have some tests. I've also added another profiler for search queries (similar to the SQLAlchemy one), and was planning for one for Redis queries (which we're apparently doing way more than we think!). I think we can merge the PR here as-is and I'll bring up in other channels how we organize this. |
Cool, I was not aware of that, we can use that one instead? Not obliged to merge this. In any case, if we merge it, I would have a feature flag and make it disabled by default. |
No description provided.