diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-01-14 08:15:00 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-01-14 08:15:00 +0000 |
commit | 94aa4e270540c078d20e75effa3d482fb2f034a8 (patch) | |
tree | d6766717d2ea99b900391ae07b60e435d8989221 /searchlib/src/tests/queryeval/weak_and/weak_and_test_expensive.cpp | |
parent | 41d8fe5cad6c871a2a76349e31b7ac0f8b38ec9b (diff) |
Reduce runtime by using 500 -> 300 children.
Diffstat (limited to 'searchlib/src/tests/queryeval/weak_and/weak_and_test_expensive.cpp')
-rw-r--r-- | searchlib/src/tests/queryeval/weak_and/weak_and_test_expensive.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/searchlib/src/tests/queryeval/weak_and/weak_and_test_expensive.cpp b/searchlib/src/tests/queryeval/weak_and/weak_and_test_expensive.cpp index b13324d9935..5a555d33420 100644 --- a/searchlib/src/tests/queryeval/weak_and/weak_and_test_expensive.cpp +++ b/searchlib/src/tests/queryeval/weak_and/weak_and_test_expensive.cpp @@ -5,10 +5,13 @@ using namespace rise; namespace { +constexpr uint32_t NUM_CHILDREN=300; +constexpr uint32_t LIMIT = 5000000; + template <typename WeakAndType, typename RiseType> void checkWandHits(WandFactory &vespa, WandFactory &rise, uint32_t step, uint32_t filter) { - WandSetup vespaSetup(vespa, 500, 5000000); - WandSetup riseSetup(rise, 500, 5000000); + WandSetup vespaSetup(vespa, NUM_CHILDREN, LIMIT); + WandSetup riseSetup(rise, NUM_CHILDREN, LIMIT); SearchIterator::UP s1 = vespaSetup.create(); s1->initFullRange(); SearchIterator::UP s2 = riseSetup.create(); @@ -38,7 +41,7 @@ void checkWandHits(WandFactory &vespa, WandFactory &rise, uint32_t step, uint32_ TEST("require that mod search works") { Stats stats; - SearchIterator::UP search(new ModSearch(stats, 3, 8, 3, NULL)); + auto search = std::make_unique<ModSearch>(stats, 3, 8, 3, nullptr); SimpleResult hits; hits.search(*search); EXPECT_EQUAL(SimpleResult().addHit(3).addHit(6), hits); @@ -47,25 +50,25 @@ TEST("require that mod search works") { //---- WeakAndSearch ------------------------------------------------------------------------------ TEST_FF("require that (array) WAND and RISE WAND gives the same hits", - VespaArrayWandFactory(500), TermFrequencyRiseWandFactory(500)) + VespaArrayWandFactory(NUM_CHILDREN), TermFrequencyRiseWandFactory(NUM_CHILDREN)) { checkWandHits<WeakAndSearch, TermFrequencyRiseWand>(f1, f2, 1, 0); } TEST_FF("require that (heap) WAND and RISE WAND gives the same hits", - VespaHeapWandFactory(500), TermFrequencyRiseWandFactory(500)) + VespaHeapWandFactory(NUM_CHILDREN), TermFrequencyRiseWandFactory(NUM_CHILDREN)) { checkWandHits<WeakAndSearch, TermFrequencyRiseWand>(f1, f2, 1, 0); } TEST_FF("require that (array) WAND and RISE WAND gives the same hits with filtering and skipping", - VespaArrayWandFactory(500), TermFrequencyRiseWandFactory(500)) + VespaArrayWandFactory(NUM_CHILDREN), TermFrequencyRiseWandFactory(NUM_CHILDREN)) { checkWandHits<WeakAndSearch, TermFrequencyRiseWand>(f1, f2, 123, 5); } TEST_FF("require that (heap) WAND and RISE WAND gives the same hits with filtering and skipping", - VespaHeapWandFactory(500), TermFrequencyRiseWandFactory(500)) + VespaHeapWandFactory(NUM_CHILDREN), TermFrequencyRiseWandFactory(NUM_CHILDREN)) { checkWandHits<WeakAndSearch, TermFrequencyRiseWand>(f1, f2, 123, 5); } @@ -74,25 +77,25 @@ TEST_FF("require that (heap) WAND and RISE WAND gives the same hits with filteri //---- ParallelWeakAndSearch ---------------------------------------------------------------------- TEST_FF("require that (array) PWAND and RISE WAND gives the same hits", - VespaParallelArrayWandFactory(500), DotProductRiseWandFactory(500)) + VespaParallelArrayWandFactory(NUM_CHILDREN), DotProductRiseWandFactory(NUM_CHILDREN)) { checkWandHits<ParallelWeakAndSearch, DotProductRiseWand>(f1, f2, 1, 0); } TEST_FF("require that (heap) PWAND and RISE WAND gives the same hits", - VespaParallelHeapWandFactory(500), DotProductRiseWandFactory(500)) + VespaParallelHeapWandFactory(NUM_CHILDREN), DotProductRiseWandFactory(NUM_CHILDREN)) { checkWandHits<ParallelWeakAndSearch, DotProductRiseWand>(f1, f2, 1, 0); } TEST_FF("require that (array) PWAND and RISE WAND gives the same hits with filtering and skipping", - VespaParallelArrayWandFactory(500), DotProductRiseWandFactory(500)) + VespaParallelArrayWandFactory(NUM_CHILDREN), DotProductRiseWandFactory(NUM_CHILDREN)) { checkWandHits<ParallelWeakAndSearch, DotProductRiseWand>(f1, f2, 123, 5); } TEST_FF("require that (heap) PWAND and RISE WAND gives the same hits with filtering and skipping", - VespaParallelHeapWandFactory(500), DotProductRiseWandFactory(500)) + VespaParallelHeapWandFactory(NUM_CHILDREN), DotProductRiseWandFactory(NUM_CHILDREN)) { checkWandHits<ParallelWeakAndSearch, DotProductRiseWand>(f1, f2, 123, 5); } |