Skip to content

Commit d894e35

Browse files
committed
Print memory_pressure before and after shutdown.
1 parent d902ea6 commit d894e35

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

rules_haskell_tests/tests/RunTests.hs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,20 @@ bazelQuery q = lines <$> runIO (Process.readProcess "bazel" ["query", q] "")
171171
shutdownBazel :: IO ()
172172
shutdownBazel = do
173173
-- DEBUG BEGIN
174-
putStrLn "Shutting down Bazel."
174+
printMem "BEFORE"
175175
-- DEBUG END
176176
assertSuccess (bazel ["shutdown"])
177+
-- DEBUG BEGIN
178+
printMem "AFTER"
179+
-- DEBUG END
177180
pure ()
178181

182+
printMem :: String -> IO ()
183+
printMem msg = do
184+
putStrLn msg
185+
(_, stdOut, _) <- Process.readProcessWithExitCode "/usr/bin/memory_pressure" [] ""
186+
putStrLn stdOut
187+
179188
-- Generated dependencies for testing the ghcide support
180189
_ghciIDE :: Int
181190
_ghciIDE = a + b

0 commit comments

Comments
 (0)