diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-03-11 17:46:02 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-03-11 17:46:02 +0000 |
commit | 95904fdc0ed0aba6fc4878c2ac05517d449b698a (patch) | |
tree | 9658d71c1e0d8d6fa29ead6d4de08276128dfc82 /searchcore | |
parent | fe10417aba7832581643491fd918563fa1bd06ac (diff) |
Add convenience method for craeting a Cursor if tracelevel is high enough.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp index e85204d42e8..aec927390d5 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp +++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp @@ -120,7 +120,7 @@ MatchThread::maybe_limit(MatchTools &tools, uint32_t matches, uint32_t docId, ui const size_t searchedSoFar = (scheduler.total_size(thread_id) - local_todo); double match_freq = estimate_match_frequency(matches, searchedSoFar); const size_t global_todo = scheduler.unassigned_size(); - vespalib::slime::Cursor * traceCursor = trace->shouldTrace(5) ? & trace->createCursor("maybe_limit") : nullptr; + vespalib::slime::Cursor * traceCursor = trace->maybeCreateCursor(5, "maybe_limit"); { auto search = tools.borrow_search(); search = tools.match_limiter().maybe_limit(std::move(search), match_freq, matchParams.numDocs, traceCursor); |