packages feed

criterion 0.5.0.9 → 0.5.0.10

raw patch · 3 files changed

+15/−10 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Criterion.hs view
@@ -28,7 +28,7 @@ import Control.Monad.Trans (liftIO) import Criterion.Analysis (OutlierVariance(..), classifyOutliers,                            outlierVariance, noteOutliers)-import Criterion.Config (Config(..), Plot(..), fromLJ)+import Criterion.Config (Config(..), Plot(..), Verbosity(..), fromLJ) import Criterion.Environment (Environment(..)) import Criterion.IO (note, prolix, summary) import Criterion.Measurement (getTime, runForAtLeast, secs, time_)@@ -60,9 +60,11 @@       sampleCount = fromLJ cfgSamples cfg       newItersD   = fromIntegral newIters       testItersD  = fromIntegral testIters-  _ <- note "collecting %d samples, %d iterations each, in estimated %s\n"-       sampleCount newIters (secs (fromIntegral sampleCount * newItersD *-                                   testTime / testItersD))+      estTime     = (fromIntegral sampleCount * newItersD *+                     testTime / testItersD)+  when (fromLJ cfgVerbosity cfg > Normal || estTime > 5) $+    note "collecting %d samples, %d iterations each, in estimated %s\n"+       sampleCount newIters (secs estTime)   times <- liftIO . fmap (U.map ((/ newItersD) . subtract (envClockCost env))) .            create sampleCount . const $ do              when (fromLJ cfgPerformGC cfg) $ performGC@@ -77,7 +79,7 @@   let numSamples = U.length times   let ests = [mean,stdDev]   numResamples <- getConfigItem $ fromLJ cfgResamples-  _ <- note "bootstrapping with %d resamples\n" numResamples+  _ <- prolix "bootstrapping with %d resamples\n" numResamples   res <- liftIO . withSystemRandom $ \gen ->          resample gen ests numResamples times :: IO [Resample]   ci <- getConfigItem $ fromLJ cfgConfInterval@@ -92,9 +94,12 @@   summary ","   bs "std dev" es   summary "\n"-  noteOutliers (classifyOutliers times)-  _ <- note "variance introduced by outliers: %.3f%%\n" (v * 100)-  _ <- note "variance is %s by outliers\n" wibble+  vrb <- getConfigItem $ fromLJ cfgVerbosity+  when (vrb == Verbose || (effect > Unaffected && vrb > Quiet)) $ do+    noteOutliers (classifyOutliers times)+    _ <- note "variance introduced by outliers: %.3f%%\n" (v * 100)+    _ <- note "variance is %s by outliers\n" wibble+    return ()   return times   where bs :: String -> Estimate -> Criterion ()         bs d e = do _ <- note "%s: %s, lb %s, ub %s, ci %.3f\n" d
Criterion/Analysis.hs view
@@ -67,7 +67,7 @@  -- | Classify outliers in a data set, using the boxplot technique. classifyOutliers :: Sample -> Outliers-classifyOutliers sa = U.foldl ((. outlier) . mappend) mempty ssa+classifyOutliers sa = U.foldl' ((. outlier) . mappend) mempty ssa     where outlier e = Outliers {                         samplesSeen = 1                       , lowSevere = if e <= loS then 1 else 0
criterion.cabal view
@@ -1,5 +1,5 @@ name:           criterion-version:        0.5.0.9+version:        0.5.0.10 synopsis:       Robust, reliable performance measurement and analysis license:        BSD3 license-file:   LICENSE