Skip to content

Commit

Permalink
Some helpful debug functions
Browse files Browse the repository at this point in the history
Reviewed By: simonmar

Differential Revision: D68561917

fbshipit-source-id: e8cf0841afe4e0475a1cf64da5150e8c8ce3c7ec
  • Loading branch information
Josef Svenningsson authored and facebook-github-bot committed Jan 23, 2025
1 parent 7824af3 commit 48f2bdb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions glean/test/lib/Glean/Database/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ module Glean.Database.Test
, setDBVersion
, setCompactOnCompletion
, setMaxSetSize
, enableTcDebug
, enableQueryDebug
, withTestEnv
, kickOffTestDB
, waitUntilComplete
Expand Down Expand Up @@ -105,6 +107,14 @@ setMaxSetSize i cfg = cfg
{ cfgServerConfig = cfgServerConfig cfg <&> \scfg -> scfg
{ ServerConfig.config_max_set_size_bytes = Just i } }

enableTcDebug :: Setting
enableTcDebug cfg = cfg
{ cfgDebug = (cfgDebug cfg) { tcDebug = True } }

enableQueryDebug :: Setting
enableQueryDebug cfg = cfg
{ cfgDebug = (cfgDebug cfg) { queryDebug = True } }

withTestEnv
:: [Setting]
-> (Env -> IO a)
Expand Down

0 comments on commit 48f2bdb

Please sign in to comment.