hsbencher-1.2: Flexible benchmark runner for Haskell and non-Haskell benchmarks.

Safe HaskellNone



Misc Small Helpers



main_threadid :: IORef ThreadIdSource

Global variable holding the main thread id.

fst3 :: (t, t1, t2) -> tSource

snd3 :: (t, t1, t2) -> t1Source

thd3 :: (t, t1, t2) -> t2Source

echoStream :: Bool -> InputStream ByteString -> BenchM (MVar ())Source

Create a thread that echos the contents of stdout/stderr InputStreams (lines) to the appropriate places (as designated by the logging facility).

runLogged :: String -> String -> BenchM (RunResult, [ByteString])Source

Run a command and wait for all output. Log output to the appropriate places. The first argument is a tag to append to each output line to make things clearer.

runLines :: String -> IO [String]Source

Runs a command through the OS shell and returns stdout split into lines. (Ignore exit code and stderr.)

runSL :: String -> IO StringSource

Runs a command through the OS shell and returns the first line of output.

forkIOH :: String -> IO () -> IO ThreadIdSource

Fork a thread but ALSO set up an error handler.

fetchBaseName :: FilePath -> FilePathSource

A more persistent version of takeBaseName.

backupResults :: String -> String -> IO ()Source

Create a backup copy of existing results_HOST.dat files.