-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Profile Case Search #34603
base: master
Are you sure you want to change the base?
Profile Case Search #34603
Conversation
def get_base_queryset(self): | ||
def get_base_queryset(self, slug=None): | ||
# slug is only informational, used for profiling | ||
CaseSearchES = self.profiler.get_case_search_class(slug) |
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.
I'm not certain whether this is the best way to override the class, but I do like the idea of using an auto-logging subclass rather than needing to use the profiler to call run
. Open to feedback if you can think of a cleaner approach
This should hopefully make the profiling code a bit less obtrusive It also means the ancestor queries will be profiled now too
To avoid messing up the numbers of the actual query
1502eda
to
c93dde8
Compare
|
||
def add_query(self, slug, es_query): |
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.
Was this function just unused?
Product Description
Technical Summary
Make the profiling code a bit less obtrusive
Feature Flag
Safety Assurance
Relying on automated and local tests
Safety story
Automated test coverage
QA Plan
Rollback instructions
Labels & Review