Skip to content

Conversation

@sakshamarora1
Copy link
Contributor

No description provided.

Copy link
Contributor

@ntarocco ntarocco left a 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?

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)
Copy link
Contributor

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
Copy link
Contributor

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.

@slint
Copy link
Member

slint commented Oct 10, 2025

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.

@ntarocco
Copy link
Contributor

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.
Saksham used to profile the issue with large author lists, but it can wait!

In any case, if we merge it, I would have a feature flag and make it disabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review 🔍

Development

Successfully merging this pull request may close these issues.

3 participants