hsbencher 1.1 → 1.1.0.1
raw patch · 3 files changed
+14/−11 lines, 3 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- HSBencher.Types: makeBuildID :: CompileFlags -> BuildID
+ HSBencher.Types: makeBuildID :: FilePath -> CompileFlags -> BuildID
Files
- HSBencher/App.hs +5/−4
- HSBencher/Types.hs +8/−6
- hsbencher.cabal +1/−1
HSBencher/App.hs view
@@ -342,7 +342,7 @@ let (diroffset,testRoot) = splitFileName testPath flags = toCompileFlags cconf paths = toCmdPaths cconf- bldid = makeBuildID flags+ bldid = makeBuildID testPath flags log "\n--------------------------------------------------------------------------------" log$ " Compiling Config "++show iterNum++" of "++show totalIters++ ": "++testRoot++" (args \""++unwords cmdargs++"\") confID "++ show bldid@@ -860,7 +860,7 @@ -- a directory that is used for `RunInPlace` builds. let (bench,params) = nextrun ccflags = toCompileFlags params- bid = makeBuildID ccflags+ bid = makeBuildID (target bench) ccflags case M.lookup bid board of Nothing -> error$ "HSBencher: Internal error: Cannot find entry in map for build ID: "++show bid Just (ccnum, Nothing) -> do @@ -882,7 +882,8 @@ -- Here we know that some previous compile with the same BuildID inserted this here. -- But the relevant question is whether some other config has stomped on it in the meantime. case M.lookup (target bench) lastConfigured of - Nothing -> error$"HSBencher: Internal error, RunInPlace in the board but not lastConfigured!: "++(target bench)+ Nothing -> error$"HSBencher: Internal error, RunInPlace in the board but not lastConfigured!: "+ ++(target bench)++ " build id "++show bid Just bid2 -> if bid == bid2 then do logT$ "Skipping rebuild of in-place benchmark: "++bid@@ -891,7 +892,7 @@ initBoard _ [] acc = acc initBoard !iter ((bench,params):rest) acc = - let bid = makeBuildID $ toCompileFlags params + let bid = makeBuildID (target bench) $ toCompileFlags params base = fetchBaseName (target bench) dfltdest = globalBinDir </> base ++"_"++bid in case M.lookup bid acc of
HSBencher/Types.hs view
@@ -264,14 +264,16 @@ type BuildID = String -- | Performs a simple reformatting (stripping disallowed characters) to create a--- build ID corresponding to a set of compile flags.-makeBuildID :: CompileFlags -> BuildID-makeBuildID strs =- intercalate "_" $- map (filter charAllowed) strs+-- build ID corresponding to a set of compile flags. To make it unique we also+-- append the target path.+makeBuildID :: FilePath -> CompileFlags -> BuildID+makeBuildID target strs =+ encodedTarget ++ + (intercalate "_" $+ map (filter charAllowed) strs) where charAllowed = isAlphaNum-+ encodedTarget = map (\ c -> if charAllowed c then c else '_') target -- | Strip all runtime options, leaving only compile-time options. This is useful -- for figuring out how many separate compiles need to happen.
hsbencher.cabal view
@@ -1,6 +1,6 @@ name: hsbencher-version: 1.1+version: 1.1.0.1 -- CHANGELOG: -- 1.0 : Initial release, new flexible benchmark format.