packages feed

tmp-postgres 1.31.0.2 → 1.31.0.3

raw patch · 4 files changed

+11/−23 lines, 4 files

Files

CHANGELOG.md view
@@ -1,5 +1,8 @@ Changelog for tmp-postgres +1.31.0.3+  #233 Add missing NOINLINE for global lock+ 1.31.0.2   #230 Fix bug when the same cache is built concurrently. 
benchmark/Main.hs view
@@ -114,31 +114,15 @@   , setupWithCache $ \theCacheConfig -> bench "withConfig silent cache" $ whnfIO $       withConfig theCacheConfig $ const $ pure () -  , bench "with migrate 10x" $ whnfIO $ replicateM 10 $ withConfig defaultConfig $ \db ->-      migrateDb db >> testQuery db-{--  , setupWithCache $ \theCacheConfig -> do-      bench "with migrate 10x and cache" $ whnfIO $ withConfig theCacheConfig $ \_ -> do-        replicateM_ 10 $ withConfig theCacheConfig $ \db ->-          migrateDb db >> testQuery db--  , setupWithCache $ \theCacheConfig -> bench "withSnapshot migrate 10x and cache" $ whnfIO $ withConfig theCacheConfig $ \db -> do-      migrateDb db-      void $ withSnapshot db $ \theSnapshotDir -> do-        let theSnapshotConfig = defaultConfig <> snapshotConfig theSnapshotDir-        replicateM_ 10 $ withConfig theSnapshotConfig testQuery--  , setupWithCache $ \theCacheConfig -> bench "cache action and recache and cache" $ whnfIO $ withTempDirectory "/tmp" "tmp-postgres-bench-cache" $ \snapshotDir -> do+ , setupWithCache $ \theCacheConfig -> bench "cache action and recache and cache" $ whnfIO $ withTempDirectory "/tmp" "tmp-postgres-bench-cache" $ \snapshotDir -> do       newConfig <- either throwIO pure =<< cacheAction snapshotDir migrateDb theCacheConfig-      replicateM_ 10 $-        either throwIO pure =<< flip withConfig testQuery-          =<< either throwIO pure =<< cacheAction snapshotDir migrateDb newConfig+      either throwIO pure =<< flip withConfig testQuery+        =<< either throwIO pure =<< cacheAction snapshotDir migrateDb newConfig    , setupWithCacheAndAction $ \snapshotDir theCacheConfig -> bench "pre-cache action and recache" $ whnfIO $ do-      replicateM_ 10 $-        either throwIO pure =<< flip withConfig testQuery-          =<< either throwIO pure =<< cacheAction snapshotDir migrateDb theCacheConfig--}+      either throwIO pure =<< flip withConfig testQuery+        =<< either throwIO pure =<< cacheAction snapshotDir migrateDb theCacheConfig+   , setupWithCacheAndSP $ \theConfig -> bench "withConfig pre-setup with withSnapshot" $ whnfIO $       void $ withConfig theConfig $ const $ pure () 
src/Database/Postgres/Temp/Internal.hs view
@@ -664,6 +664,7 @@ ------------------------------------------------------------------------------- cacheLock :: MVar () cacheLock = unsafePerformIO $ newMVar ()+{-# NOINLINE cacheLock #-}  {-| Check to see if a cached data directory exists.
tmp-postgres.cabal view
@@ -1,5 +1,5 @@ name:                tmp-postgres-version:             1.31.0.2+version:             1.31.0.3 synopsis: Start and stop a temporary postgres description: Start and stop a temporary postgres. See README.md homepage:            https://github.com/jfischoff/tmp-postgres#readme