aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@yahooinc.com>2024-01-19 14:34:54 +0000
committerHåvard Pettersen <havardpe@yahooinc.com>2024-01-22 14:53:33 +0000
commit56da1f042e9d2d545267c33242a51bf94a5fd12b (patch)
treedec504966cd31b918fb49a46174f7e65f59038c9 /searchcore/src/tests
parentccda952db487445f3522eecbcbfee4a6f6a90c32 (diff)
wire in strict flow analysis and strict-aware sorting
strict_cost added to all blueprints separate top-down sort step after optimize move relative estimate out of blueprint state optimize all children; to calculate flow stats leaf defaults: matching>0.9: est: 0.5, cost: 1.0, strict_cost: 1.0 matching<=0.9: est: rel_est, cost: 1.0, strict_cost: rel_est
Diffstat (limited to 'searchcore/src/tests')
-rw-r--r--searchcore/src/tests/proton/documentmetastore/lid_allocator/lid_allocator_test.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/searchcore/src/tests/proton/documentmetastore/lid_allocator/lid_allocator_test.cpp b/searchcore/src/tests/proton/documentmetastore/lid_allocator/lid_allocator_test.cpp
index e136e491f05..4aefa10f5f2 100644
--- a/searchcore/src/tests/proton/documentmetastore/lid_allocator/lid_allocator_test.cpp
+++ b/searchcore/src/tests/proton/documentmetastore/lid_allocator/lid_allocator_test.cpp
@@ -180,9 +180,10 @@ TEST_F(LidAllocatorTest, whitelist_blueprint_can_maximize_relative_estimate)
activate_lids({ 1, 2, 3, 4 }, true);
// the number of hits are overestimated based on the number of
// documents that could be active (100 in this test fixture)
- EXPECT_EQ(make_whitelist_blueprint(1000)->estimate(), 0.1);
- EXPECT_EQ(make_whitelist_blueprint(200)->estimate(), 0.5);
- EXPECT_EQ(make_whitelist_blueprint(5)->estimate(), 1.0);
+ // NOTE: optimize must be called in order to calculate the relative estimate
+ EXPECT_EQ(Blueprint::optimize(make_whitelist_blueprint(1000))->estimate(), 0.1);
+ EXPECT_EQ(Blueprint::optimize(make_whitelist_blueprint(200))->estimate(), 0.5);
+ EXPECT_EQ(Blueprint::optimize(make_whitelist_blueprint(5))->estimate(), 1.0);
}
class LidAllocatorPerformanceTest : public LidAllocatorTest,