diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-07-06 17:11:58 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-07-06 17:11:58 +0000 |
commit | 78e7a81c74fa452b2ee636ca3913d0130c3e5939 (patch) | |
tree | 8f67b12655050e61c2fa45dc3d21c68728528d9a /searchlib/src/tests/ranksetup | |
parent | 5816b7cf411fef217d9add56595ec2dbf04ea4bb (diff) |
In order to reduce overhead we look at the hit estimate before fanning out to multiple threads.
Default is as today, configurable per rank-profile via min-hits-per-thread.
Default should be changed to a sane number once verified.
The main intentions is to counter the sometimes high cost of per thread rank-setup.
Diffstat (limited to 'searchlib/src/tests/ranksetup')
-rw-r--r-- | searchlib/src/tests/ranksetup/ranksetup_test.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/searchlib/src/tests/ranksetup/ranksetup_test.cpp b/searchlib/src/tests/ranksetup/ranksetup_test.cpp index aee04ef4cb7..ead2f09766d 100644 --- a/searchlib/src/tests/ranksetup/ranksetup_test.cpp +++ b/searchlib/src/tests/ranksetup/ranksetup_test.cpp @@ -485,6 +485,7 @@ void RankSetupTest::testRankSetup() env.getProperties().add(dump::Feature::NAME, "foo"); env.getProperties().add(dump::Feature::NAME, "bar"); env.getProperties().add(matching::NumThreadsPerSearch::NAME, "3"); + env.getProperties().add(matching::MinHitsPerThread::NAME, "8"); env.getProperties().add(matchphase::DegradationAttribute::NAME, "mystaticrankattr"); env.getProperties().add(matchphase::DegradationAscendingOrder::NAME, "true"); env.getProperties().add(matchphase::DegradationMaxHits::NAME, "12345"); @@ -509,6 +510,7 @@ void RankSetupTest::testRankSetup() EXPECT_EQUAL(rs.getDumpFeatures()[0], vespalib::string("foo")); EXPECT_EQUAL(rs.getDumpFeatures()[1], vespalib::string("bar")); EXPECT_EQUAL(rs.getNumThreadsPerSearch(), 3u); + EXPECT_EQUAL(rs.getMinHitsPerThread(), 8u); EXPECT_EQUAL(rs.getDegradationAttribute(), "mystaticrankattr"); EXPECT_EQUAL(rs.isDegradationOrderAscending(), true); EXPECT_EQUAL(rs.getDegradationMaxHits(), 12345u); |