diff --git a/benchmark/Benchmark.hs b/benchmark/Benchmark.hs index ecc05838..3ecf7780 100644 --- a/benchmark/Benchmark.hs +++ b/benchmark/Benchmark.hs @@ -41,17 +41,17 @@ main = do liftIO $ putMVar done () let timeAction name nActions action = do - startT <- getCurrentTime - -- each clients runs ACTION nRepetitions times - let nRepetitions = nRequests `div` nClients `div` nActions - replicateM_ nClients $ putMVar start (replicateM_ nRepetitions action) - replicateM_ nClients $ takeMVar done - stopT <- getCurrentTime - let deltaT = realToFrac $ diffUTCTime stopT startT - -- the real # of reqs send. We might have lost some due to 'div'. - actualReqs = nRepetitions * nActions * nClients - rqsPerSec = fromIntegral actualReqs / deltaT :: Double - putStrLn $ printf "%-20s %10.2f Req/s" (name :: String) rqsPerSec + startT <- getCurrentTime + -- each clients runs ACTION nRepetitions times + let nRepetitions = nRequests `div` nClients `div` nActions + replicateM_ nClients $ putMVar start (replicateM_ nRepetitions action) + replicateM_ nClients $ takeMVar done + stopT <- getCurrentTime + let deltaT = realToFrac $ diffUTCTime stopT startT + -- the real # of reqs send. We might have lost some due to 'div'. + actualReqs = nRepetitions * nActions * nClients + rqsPerSec = fromIntegral actualReqs / deltaT :: Double + putStrLn $ printf "%-20s %10.2f Req/s" (name :: String) rqsPerSec ---------------------------------------------------------------------- -- Benchmarks diff --git a/src/Database/Redis/Commands.hs b/src/Database/Redis/Commands.hs index 7c8772d3..634740d7 100644 --- a/src/Database/Redis/Commands.hs +++ b/src/Database/Redis/Commands.hs @@ -239,7 +239,6 @@ XReadOpts(..), defaultXreadOpts, XReadResponse(..), StreamsRecord(..), -TrimOpts(..), xadd, xaddOpts, XAddOpts(..), diff --git a/src/Database/Redis/Sentinel.hs b/src/Database/Redis/Sentinel.hs index 8c15b3c5..d3a4f0d8 100644 --- a/src/Database/Redis/Sentinel.hs +++ b/src/Database/Redis/Sentinel.hs @@ -46,7 +46,6 @@ import Control.Exception (Exception, IOException, evaluate, throwI import Control.Monad import Control.Monad.Catch (Handler (..), MonadCatch, catches, throwM) import Control.Monad.Except -import Control.Monad.IO.Class(MonadIO(liftIO)) import Data.ByteString (ByteString) import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BS8