File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ withBenchDB conf num act = do
3939 | useLMDB conf = [setLMDBStorage]
4040 | otherwise = []
4141
42- withEmptyTestDB settings $ \ env repo -> do
42+ withEmptyTestDB (enableRocksDBCache : settings) $ \ env repo -> do
4343 withOpenDatabase env repo $ \ odb ->
4444 void $ return odb
4545
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ module Glean.Database.Test
2222 , setMaxSetSize
2323 , enableTcDebug
2424 , enableQueryDebug
25+ , enableRocksDBCache
2526 , withTestEnv
2627 , kickOffTestDB
2728 , waitUntilComplete
@@ -120,6 +121,13 @@ enableQueryDebug :: Setting
120121enableQueryDebug cfg = cfg
121122 { cfgDebug = (cfgDebug cfg) { queryDebug = True } }
122123
124+ enableRocksDBCache :: Setting
125+ enableRocksDBCache cfg = cfg
126+ { cfgServerConfig = (cfgServerConfig cfg) <&> \ scfg -> scfg
127+ { ServerConfig. config_db_rocksdb_cache_mb =
128+ ServerConfig. config_db_rocksdb_cache_mb def }
129+ }
130+
123131withTestEnv
124132 :: [Setting ]
125133 -> (Env -> IO a )
You can’t perform that action at this time.
0 commit comments