hsbencher 1.3.6 → 1.3.8
raw patch · 4 files changed
+38/−5 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
+ HSBencher.App: RunID :: String -> Flag
+ HSBencher.App: SkipTo :: String -> Flag
+ HSBencher.Config: RunID :: String -> Flag
+ HSBencher.Config: SkipTo :: String -> Flag
+ HSBencher.Types: runID :: Config -> Maybe String
+ HSBencher.Types: skipTo :: Config -> Maybe Int
- HSBencher.Types: Config :: [Benchmark DefaultParamMeaning] -> Maybe String -> (String, Double) -> Maybe Double -> Int -> Int -> Bool -> Bool -> Bool -> PathRegistry -> String -> Integer -> String -> String -> (String, String, Int) -> [BuildMethod] -> OutputStream ByteString -> OutputStream ByteString -> OutputStream ByteString -> [[(String, String)]] -> Bool -> (LineHarvester, Maybe LineHarvester) -> Bool -> FusionConfig -> Config
+ HSBencher.Types: Config :: [Benchmark DefaultParamMeaning] -> Maybe String -> (String, Double) -> Maybe Double -> Int -> Int -> Maybe Int -> Maybe String -> Bool -> Bool -> Bool -> PathRegistry -> String -> Integer -> String -> String -> (String, String, Int) -> [BuildMethod] -> OutputStream ByteString -> OutputStream ByteString -> OutputStream ByteString -> [[(String, String)]] -> Bool -> (LineHarvester, Maybe LineHarvester) -> Bool -> FusionConfig -> Config
Files
- HSBencher/App.hs +7/−1
- HSBencher/Config.hs +21/−3
- HSBencher/Types.hs +2/−0
- hsbencher.cabal +8/−1
HSBencher/App.hs view
@@ -601,6 +601,7 @@ proceed else runloop iter (M.insert bid (ccnum,Nothing) board) lastConfigured (nextrun:rest) + -- Keeps track of what's compiled. initBoard _ [] acc = acc initBoard !iter ((bench,params):rest) acc = let bid = makeBuildID (target bench) $ toCompileFlags params @@ -618,7 +619,12 @@ zippedruns = (concat$ zipWith (\ b cfs -> map (b,) cfs) benchlist allruns) unless recomp $ logT$ "Recompilation disabled, assuming standalone binaries are in the expected places!"- runloop 1 (initBoard 1 zippedruns M.empty) M.empty zippedruns+ let startBoard = initBoard 1 zippedruns M.empty+ Config{skipTo} <- ask+ case skipTo of + Nothing -> runloop 1 startBoard M.empty zippedruns+ Just ix -> do logT$" !!! WARNING: SKIPPING AHEAD in configuration space; jumping to: "++show ix+ runloop ix startBoard M.empty (drop (ix-1) zippedruns) {- do Config{logOut, resultsOut, stdOut} <- ask
HSBencher/Config.hs view
@@ -50,6 +50,7 @@ | BinDir FilePath | NoRecomp | NoCabal | NoClean | ShortRun | KeepGoing | NumTrials String+ | SkipTo String | RunID String | CabalPath String | GHCPath String | ShowHelp | ShowVersion #ifdef FUSION_TABLES@@ -76,7 +77,7 @@ , Option [] ["shortrun"] (NoArg ShortRun) "Elide command line args to benchmarks to perform a testing rather than benchmarking run." , Option ['k'] ["keepgoing"] (NoArg KeepGoing)- "Keep executing even after a build or run fails."+ "Keep executing even after a build or run fails (default false)" #ifndef DISABLED , Option [] ["no-cabal"] (NoArg NoCabal) "A shortcut to remove Cabal from the BuildMethods"@@ -88,6 +89,12 @@ , Option [] ["trials"] (ReqArg NumTrials "NUM") "The number of times to run each benchmark."++ , Option [] ["runid"] (ReqArg RunID "NUM")+ "Force run ID to be a specific string; useful for completing failed runs"+ , Option [] ["skipto"] (ReqArg (SkipTo ) "NUM")+ "Skip ahead to a specific point in the configuration space."+ , Option ['h'] ["help"] (NoArg ShowHelp) "Show this help message and exit." @@ -124,12 +131,14 @@ uname <- runSL "uname -a" lspci <- runLines "lspci" whos <- runLines "who"- let runID = (hostname ++ "_" ++ show startTime)+ let newRunID = (hostname ++ "_" ++ show startTime) let (branch,revision,depth) = gitInfo return $ base { _HOSTNAME = hostname- , _RUNID = runID + , _RUNID = case runID of+ Just r -> r+ Nothing -> newRunID , _DATETIME = show datetime , _TRIALS = trials , _ENV_VARS = show envs @@ -196,6 +205,8 @@ , benchsetName = Nothing -- , trials = read$ get "TRIALS" "1" , trials = 1+ , skipTo = Nothing+ , runID = Nothing , pathRegistry = M.empty -- , benchlist = parseBenchList benchstr -- , benchversion = (benchF, ver)@@ -247,6 +258,13 @@ case reads s of (n,_):_ -> n [] -> error$ "--trials given bad argument: "++s }+ doFlag (SkipTo s) r = r { skipTo=+ case reads s of+ (n,_):_ | n >= 1 -> Just n+ | otherwise -> error$ "--skipto must be positive: "++s+ [] -> error$ "--skipto given bad argument: "++s }+ doFlag (RunID s) r = r { runID= Just s }+ -- Ignored options: doFlag ShowHelp r = r doFlag ShowVersion r = r
HSBencher/Types.hs view
@@ -164,6 +164,8 @@ , runTimeOut :: Maybe Double -- ^ Timeout for running benchmarks (if not specified by the benchmark specifically) , maxthreads :: Int , trials :: Int -- ^ number of runs of each configuration+ , skipTo :: Maybe Int -- ^ Where to start in the config space.+ , runID :: Maybe String -- ^ An over-ride for the run ID. , shortrun :: Bool , doClean :: Bool , keepgoing :: Bool -- ^ keep going after error
hsbencher.cabal view
@@ -1,6 +1,6 @@ name: hsbencher-version: 1.3.6+version: 1.3.8 -- CHANGELOG: -- 1.0 : Initial release, new flexible benchmark format. -- 1.1 : Change interface to RunInPlace@@ -12,6 +12,7 @@ -- 1.3.2 : change policy for timeouts and errors -- 1.3.4 : Add ability to prune/select benchmarks with commmand line args -- 1.3.6 : bugfix productivity for timeouts+-- 1.3.8 : Added --skipto and --runid synopsis: Flexible benchmark runner for Haskell and non-Haskell benchmarks. @@ -60,6 +61,12 @@ . More examples can be found here: <https://github.com/rrnewton/HSBencher/tree/master/example>+ . + ChangesLog:+ .+ * (1.3.8) Added @--skipto@ and @--runid@ arguments+ * (1.3.4) Added ability to prune benchmarks with patterns on command line.+ license: BSD3 license-file: LICENSE