jainankitk commented on PR #14413: URL: https://github.com/apache/lucene/pull/14413#issuecomment-2758741304
> Can you explain why we need two impls? I would have assumed that the ConcurrentQueryProfilerBreakdown could also be used for searches that are not concurrent? `ConcurrentQueryProfilerBreakdown` maintains separate instance of `QueryProfileBreakdown` for each segment. In the context method, `ConcurrentQueryProfilerBreakdown` returns corresponding `QueryProfileBreakdown` object for each segment. ``` @Override public QueryProfilerBreakdown context(LeafReaderContext context) { return this; } ``` Hence, I felt we don't need to take the overhead of creating breakdown per segment and then merging it together during response. That being said, eventually we can keep just `ConcurrentQueryProfilerBreakdown` if we prefer that for simplicity. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org