Safe Haskell | None |
---|---|
Language | Haskell2010 |
Misc Small Helpers
- defaultTimeout :: Double
- backupResults :: String -> String -> IO ()
- runLogged :: String -> String -> [(String, String)] -> BenchM (RunResult, [ByteString])
- runSL :: String -> IO String
- runLines :: String -> IO [String]
- trim :: String -> String
- fetchBaseName :: FilePath -> FilePath
- echoStream :: Bool -> InputStream ByteString -> BenchM (Async ())
- my_name :: String
- main_threadid :: IORef ThreadId
Documentation
defaultTimeout :: Double Source
In seconds.
backupResults :: String -> String -> IO () Source
Create a backup copy of existing results_HOST.dat files.
runLogged :: String -> String -> [(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.
runSL :: String -> IO String Source
Runs a command through the OS shell and returns the first line of output. (Ignore exit code and stderr.)
If the command does not return any output, this function returns the empty string.
runLines :: String -> IO [String] Source
Runs a command through the OS shell and returns stdout split into lines. (Ignore exit code and stderr.)
fetchBaseName :: FilePath -> FilePath Source
A more persistent version of takeBaseName
.
echoStream :: Bool -> InputStream ByteString -> BenchM (Async ()) Source
Create a thread that echos the contents of stdout/stderr InputStreams (lines) to the appropriate places (as designated by the logging facility). Returns an MVar used to synchronize on the completion of the echo thread.
main_threadid :: IORef ThreadId Source
Global variable holding the main thread id.