diff options
author | Håvard Pettersen <havardpe@yahooinc.com> | 2024-06-03 18:25:52 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@yahooinc.com> | 2024-06-03 18:25:52 +0000 |
commit | 95f52d59563cf002502e48fc3bb08bd64fb17355 (patch) | |
tree | 850e908c2165541cecf112ae5d60bd8b6f7e3c86 /searchcore | |
parent | 270c1063a2be804a2900f5db943ad8813b991299 (diff) |
enumerate blueprint nodes if trace level high enough
Diffstat (limited to 'searchcore')
3 files changed, 11 insertions, 0 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp index 66648dda8c6..73a812f936f 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp @@ -206,6 +206,9 @@ MatchToolsFactory(QueryLimiter & queryLimiter, _query.extractLocations(_queryEnv.locations()); trace.addEvent(5, "Build query execution plan"); _query.reserveHandles(_requestContext, searchContext, _mdl); + if (trace.getLevel() >= 6) { // will dump blueprint later + _query.enumerate_blueprint_nodes(); + } trace.addEvent(5, "Optimize query execution plan"); bool sort_by_cost = SortBlueprintsByCost::check(_queryEnv.getProperties(), rankSetup.sort_blueprints_by_cost()); double hitRate = std::min(1.0, double(maxNumHits)/double(searchContext.getDocIdLimit())); diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.cpp b/searchcore/src/vespa/searchcore/proton/matching/query.cpp index 70f60ff1c2d..b31451059be 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/query.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/query.cpp @@ -198,6 +198,12 @@ Query::reserveHandles(const IRequestContext & requestContext, ISearchContext &co } void +Query::enumerate_blueprint_nodes() noexcept +{ + _blueprint->enumerate(1); +} + +void Query::optimize(InFlow in_flow, bool sort_by_cost) { _in_flow = in_flow; diff --git a/searchcore/src/vespa/searchcore/proton/matching/query.h b/searchcore/src/vespa/searchcore/proton/matching/query.h index 03aea5a0d2d..8d6f84763a3 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/query.h +++ b/searchcore/src/vespa/searchcore/proton/matching/query.h @@ -97,6 +97,8 @@ public: ISearchContext &context, search::fef::MatchDataLayout &mdl); + void enumerate_blueprint_nodes() noexcept; + /** * Optimize the query to be executed. This function should be * called after the reserveHandles function and before the |