diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-06-27 13:31:04 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-06-27 13:31:04 +0000 |
commit | 04dd1737b5fff8ae4a092f6abe9c1786f72ff357 (patch) | |
tree | 6675d993ac0f991b46f7d57bceef2653c96a6fc0 /searchcore | |
parent | 27ccb86f0edbd150815e7613ab42c65d4b5495f3 (diff) |
Make covered and numActiveLids visible in larger scope
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/matcher.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp index 1c9cd9bad52..6bd1e537bbc 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp @@ -226,6 +226,8 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl total_matching_time.start(); MatchingStats my_stats; SearchReply::UP reply = std::make_unique<SearchReply>(); + size_t covered = 0; + uint32_t numActiveLids = 0; { // we want to measure full set-up and tear-down time as part of // collateral time GroupingContext groupingContext(_clock, request.getTimeOfDoom(), @@ -289,7 +291,7 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl } reply = std::move(result->_reply); - uint32_t numActiveLids = metaStore.getNumActiveLids(); + numActiveLids = metaStore.getNumActiveLids(); // note: this is actually totalSpace+1, since 0 is reserved uint32_t totalSpace = metaStore.getCommittedDocIdLimit(); LOG(debug, "docid limit = %d", totalSpace); @@ -302,7 +304,7 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl // account for docid 0 reserved spaceEstimate += 1; } - size_t covered = (spaceEstimate * numActiveLids) / totalSpace; + covered = (spaceEstimate * numActiveLids) / totalSpace; LOG(debug, "covered = %zd", covered); SearchReply::Coverage & coverage = reply->coverage; |