packages feed

hsbencher-fusion 0.3.3 → 0.3.4

raw patch · 2 files changed

+38/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CSVUploader/Main.hs view
@@ -22,7 +22,9 @@ import System.Console.GetOpt (getOpt, getOpt', ArgOrder(Permute), OptDescr(Option), ArgDescr(..), usageInfo) import System.Environment (getArgs) import System.Exit-import qualified Data.Map                               as Map+import System.IO.Unsafe (unsafePerformIO)+import qualified Data.Map as M+import qualified Data.Set as S  import Text.CSV @@ -96,6 +98,15 @@   | L.elem "PROGNAME" hdr = return ()   | otherwise = error $ "Bad HEADER line on CSV file: "++show hdr +-- | Get config data about the benchmark platform, but only if needed+{-+{-# NOINLINE gconf #-}+gconf :: Config+gconf = unsafePerformIO $ do+  putStrLn $ "\n\n ["++this_progname++"] WARNING: tuple incomplete, gathering environmental data from current platform..."+  getConfig [] []+-}+ -- TODO: Add checking to see if the rows are already there.  However -- that would be expensive if we do one query per row.  The ideal -- implementation would examine the structure of the rowset and make@@ -104,5 +115,29 @@ uprow total gconf (ix,tuple)  = do   putStrLn $ "\n\n ["++this_progname++"] Begin upload of row "++show ix++" of "++show total   putStrLn "================================================================================"-  let br  = tupleToResult tuple++  let tup0 = resultToTuple emptyBenchmarkResult+      schema0 = S.fromList (map fst tup0)+      schema1 = S.fromList (map fst tuple)+      br1     = tupleToResult tuple+      missing = S.difference schema0 schema1+  +  -- Case 1: EVERYTHING is present in the uploaded tuple.+  br <- if S.null missing then+          return (tupleToResult tuple)+        else do+          putStrLn $ "\n\n ["++this_progname++"] Fields missing: "++show (S.toList missing)+          -- Otherwise something is missing.+          -- Start with the empty tuple, augmented with environmental info:+          br1 <- augmentResultWithConfig gconf emptyBenchmarkResult+          -- Layer on what we have.+          return $ +            tupleToResult (M.toList (M.union (M.fromList tuple)+                                             (M.fromList (resultToTuple br1))))+     runReaderT (uploadBenchResult br) gconf+++++
hsbencher-fusion.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                hsbencher-fusion-version:             0.3.3+version:             0.3.4 synopsis:            Backend for uploading benchmark data to Google Fusion Tables. description:          Google Fusion tables are a type of Google Doc that resembles a