summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-03-11 17:11:23 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2019-03-11 17:11:23 +0000
commitf726dbaedf53ed283f3f491acc09f24e76b757af (patch)
tree1647e59a8bd54e2f533086e1609206deb8b79102 /searchcore
parentbcc209d6aa645967639d8cf9197d355132fa5b5e (diff)
Passing the trace object will do just fine.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_master.cpp10
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_master.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matcher.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_master.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_master.cpp
index aedc14ef668..7dd06038707 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_master.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_master.cpp
@@ -5,7 +5,7 @@
#include "match_loop_communicator.h"
#include "match_thread.h"
#include <vespa/searchlib/attribute/attribute_operation.h>
-#include <vespa/searchlib/engine/request.h>
+#include <vespa/searchlib/engine/trace.h>
#include <vespa/searchlib/common/featureset.h>
#include <vespa/vespalib/util/thread_bundle.h>
#include <vespa/vespalib/data/slime/inserter.h>
@@ -58,7 +58,7 @@ createScheduler(uint32_t numThreads, uint32_t numSearchPartitions, uint32_t numD
} // namespace proton::matching::<unnamed>
ResultProcessor::Result::UP
-MatchMaster::match(const search::engine::Request & request,
+MatchMaster::match(search::engine::Trace & trace,
const MatchParams &params,
vespalib::ThreadBundle &threadBundle,
const MatchToolsFactory &mtf,
@@ -81,7 +81,7 @@ MatchMaster::match(const search::engine::Request & request,
: static_cast<IMatchLoopCommunicator&>(communicator);
threadState.emplace_back(std::make_unique<MatchThread>(i, threadBundle.size(), params, mtf, com, *scheduler,
resultProcessor, mergeDirector, distributionKey,
- request.getRelativeTime(), request.trace().getLevel()));
+ trace.getRelativeTime(), trace.getLevel()));
targets.push_back(threadState.back().get());
}
resultProcessor.prepareThreadContextCreation(threadBundle.size());
@@ -92,8 +92,8 @@ MatchMaster::match(const search::engine::Request & request,
double rerank_time_s = timedCommunicator.rerank_time.elapsed().sec();
double match_time_s = 0.0;
std::unique_ptr<vespalib::slime::Inserter> inserter;
- if (request.trace().shouldTrace(4)) {
- inserter = std::make_unique<vespalib::slime::ArrayInserter>(request.trace().createCursor("match_threads").setArray("threads"));
+ if (trace.shouldTrace(4)) {
+ inserter = std::make_unique<vespalib::slime::ArrayInserter>(trace.createCursor("match_threads").setArray("threads"));
}
for (size_t i = 0; i < threadState.size(); ++i) {
const MatchThread & matchThread = *threadState[i];
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_master.h b/searchcore/src/vespa/searchcore/proton/matching/match_master.h
index 8e28d0350e4..c9a9a24945a 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_master.h
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_master.h
@@ -7,7 +7,7 @@
namespace vespalib { struct ThreadBundle; }
namespace search { class FeatureSet; }
-namespace search::engine { class Request; }
+namespace search::engine { class Trace; }
namespace proton::matching {
@@ -24,7 +24,7 @@ private:
public:
const MatchingStats & getStats() const { return _stats; }
- ResultProcessor::Result::UP match(const search::engine::Request &request,
+ ResultProcessor::Result::UP match(search::engine::Trace & trace,
const MatchParams &params,
vespalib::ThreadBundle &threadBundle,
const MatchToolsFactory &mtf,
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
index 2442c041200..89aa8a18935 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
@@ -270,7 +270,7 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl
LimitedThreadBundleWrapper limitedThreadBundle(threadBundle, numThreadsPerSearch);
MatchMaster master;
uint32_t numParts = NumSearchPartitions::lookup(rankProperties, _rankSetup->getNumSearchPartitions());
- ResultProcessor::Result::UP result = master.match(request, params, limitedThreadBundle, *mtf, rp,
+ ResultProcessor::Result::UP result = master.match(request.trace(), params, limitedThreadBundle, *mtf, rp,
_distributionKey, numParts);
my_stats = MatchMaster::getStats(std::move(master));