criterion 1.5.9.0 → 1.5.10.0
raw patch · 8 files changed
+43/−30 lines, 8 filesdep ~base-compat-batteriesPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base-compat-batteries
API changes (from Hackage documentation)
Files
- Criterion/Analysis.hs +7/−3
- Criterion/Main/Options.hs +8/−1
- README.markdown +4/−11
- changelog.md +7/−0
- criterion.cabal +7/−6
- examples/ConduitVsPipes.hs +1/−1
- examples/Overhead.hs +5/−5
- examples/criterion-examples.cabal +4/−3
Criterion/Analysis.hs view
@@ -157,8 +157,10 @@ rs <- mapM (\(ps,r) -> regress gen ps r meas) $ ((["iters"],"time"):regressions) resamps <- liftIO $ resample gen ests resamples stime- let [estMean,estStdDev] = B.bootstrapBCA confInterval stime resamps- ov = outlierVariance estMean estStdDev (fromIntegral n)+ (estMean,estStdDev) <- case B.bootstrapBCA confInterval stime resamps of+ [estMean',estStdDev'] -> return (estMean',estStdDev')+ ests' -> throwE $ "analyseSample: Expected two estimation functions, received: " ++ show ests'+ let ov = outlierVariance estMean estStdDev (fromIntegral n) an = SampleAnalysis { anRegress = rs , anMean = estMean@@ -193,7 +195,9 @@ let unmeasured = [n | (n, Nothing) <- map (second ($ G.head meas)) accs] unless (null unmeasured) $ throwE $ "no data available for " ++ renderNames unmeasured- let (r:ps) = map ((`measure` meas) . (fromJust .) . snd) accs+ (r,ps) <- case map ((`measure` meas) . (fromJust .) . snd) accs of+ (r':ps') -> return (r',ps')+ [] -> throwE "regress: Expected at least one accessor" Config{..} <- ask (coeffs,r2) <- liftIO $ bootstrapRegress gen resamples confInterval olsRegress ps r
Criterion/Main/Options.hs view
@@ -133,7 +133,8 @@ <*> option (range 1 1000000) (long "resamples" <> metavar "COUNT" <> value resamples <> help "Number of bootstrap resamples to perform")- <*> many (option regressParams+ <*> manyDefault regressions+ (option regressParams (long "regress" <> metavar "RESP:PRED.." <> help "Regressions to perform")) <*> outputOption rawDataFile (long "raw" <>@@ -153,6 +154,12 @@ <*> strOption (long "template" <> short 't' <> metavar "FILE" <> value template <> help "Template to use for report")++manyDefault :: [a] -> Parser a -> Parser [a]+manyDefault def m = set_default <$> many m+ where+ set_default [] = def+ set_default xs = xs outputOption :: Maybe String -> Mod OptionFields String -> Parser (Maybe String) outputOption file m =
README.markdown view
@@ -1,6 +1,6 @@ # Criterion: robust, reliable performance measurement -[](https://hackage.haskell.org/package/criterion) [](https://travis-ci.org/bos/criterion)+[](https://hackage.haskell.org/package/criterion) [](https://github.com/haskell/criterion/actions?query=workflow%3AHaskell-CI) This package provides the Criterion module, a Haskell library for measuring and analysing software performance.@@ -24,18 +24,11 @@ # Get involved! Please report bugs via the-[github issue tracker](https://github.com/bos/criterion/issues).--Master [github repository](https://github.com/bos/criterion):--* `git clone https://github.com/bos/criterion.git`--There's also a [Mercurial mirror](https://bitbucket.org/bos/criterion):--* `hg clone https://bitbucket.org/bos/criterion`+[github issue tracker](https://github.com/haskell/criterion/issues). -(You can create and contribute changes using either Mercurial or git.)+Master [github repository](https://github.com/haskell/criterion): +* `git clone https://github.com/haskell/criterion.git` # Authors
changelog.md view
@@ -1,3 +1,10 @@+1.5.10.0++* Fix a bug in which the `defaultMainWith` function would not use the+ `regressions` values specified in the `Config` argument. This bug only+ affected `criterion` the library—uses of the `--regressions` flag from+ `criterion` executables themselves were unaffected.+ 1.5.9.0 * Fix a bug where HTML reports failed to escape JSON properly.
criterion.cabal view
@@ -1,5 +1,5 @@ name: criterion-version: 1.5.9.0+version: 1.5.10.0 synopsis: Robust, reliable performance measurement and analysis license: BSD3 license-file: LICENSE@@ -8,7 +8,7 @@ copyright: 2009-2016 Bryan O'Sullivan and others category: Development, Performance, Testing, Benchmarking homepage: http://www.serpentine.com/criterion-bug-reports: https://github.com/bos/criterion/issues+bug-reports: https://github.com/haskell/criterion/issues build-type: Simple cabal-version: >= 1.10 extra-source-files:@@ -26,8 +26,9 @@ GHC==8.2.2, GHC==8.4.4, GHC==8.6.5,- GHC==8.8.3,- GHC==8.10.1+ GHC==8.8.4,+ GHC==8.10.4,+ GHC==9.0.1 data-files: templates/*.css@@ -79,7 +80,7 @@ Paths_criterion build-depends:- aeson >= 0.8,+ aeson >= 1, ansi-wl-pprint >= 0.6.7.2, base >= 4.5 && < 5, base-compat-batteries >= 0.10 && < 0.12,@@ -218,4 +219,4 @@ source-repository head type: git- location: https://github.com/bos/criterion.git+ location: https://github.com/haskell/criterion.git
examples/ConduitVsPipes.hs view
@@ -1,5 +1,5 @@ -- Contributed by Gabriel Gonzales as a test case for--- https://github.com/bos/criterion/issues/35+-- https://github.com/haskell/criterion/issues/35 -- -- The numbers reported by this benchmark can be made "more correct" -- by compiling with the -fno-full-laziness option.
examples/Overhead.hs view
@@ -14,11 +14,11 @@ M.initializeTime -- Need to do this before calling M.getTime statsEnabled <- getRTSStatsEnabled defaultMain $ [- bench "measure" $ whnfIO (M.measure (whnfIO $ return ()) 1)- , bench "getTime" $ whnfIO M.getTime- , bench "getCPUTime" $ whnfIO M.getCPUTime- , bench "getCycles" $ whnfIO M.getCycles- , bench "M.getGCStatisticss" $ whnfIO M.getGCStatistics+ bench "measure" $ whnfIO (M.measure (whnfIO $ return ()) 1)+ , bench "getTime" $ whnfIO M.getTime+ , bench "getCPUTime" $ whnfIO M.getCPUTime+ , bench "getCycles" $ whnfIO M.getCycles+ , bench "M.getGCStatistics" $ whnfIO M.getGCStatistics ] ++ if statsEnabled then [bench #if MIN_VERSION_base(4,10,0)
examples/criterion-examples.cabal view
@@ -2,7 +2,7 @@ version: 0 synopsis: Examples for the criterion benchmarking system description: Examples for the criterion benchmarking system.-homepage: https://github.com/bos/criterion+homepage: https://github.com/haskell/criterion license: BSD3 license-file: LICENSE author: Bryan O'Sullivan <bos@serpentine.com>@@ -19,8 +19,9 @@ GHC==8.2.2, GHC==8.4.4, GHC==8.6.5,- GHC==8.8.3,- GHC==8.10.1+ GHC==8.8.4,+ GHC==8.10.4,+ GHC==9.0.1 flag conduit-vs-pipes default: True