Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-criterion-measurement for
openSUSE:Factory checked in at 2022-10-13 15:41:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-criterion-measurement (Old)
and /work/SRC/openSUSE:Factory/.ghc-criterion-measurement.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-criterion-measurement"
Thu Oct 13 15:41:33 2022 rev:3 rq:1008449 version:0.2.0.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/ghc-criterion-measurement/ghc-criterion-measurement.changes
2021-08-25 20:57:30.949215731 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-criterion-measurement.new.2275/ghc-criterion-measurement.changes
2022-10-13 15:41:40.266682396 +0200
@@ -1,0 +2,19 @@
+Thu Aug 11 23:00:35 UTC 2022 - Peter Simons <[email protected]>
+
+- Update criterion-measurement to version 0.2.0.0.
+ 0.2.0.0
+
+ * Add a `measPeakMbAllocated` field to `Measured` for reporting maximum
+ megabytes allocated. Naturally, this affects the behavior of `Measured`'s
+ `{To,From}JSON` and `Binary` instances.
+
+-------------------------------------------------------------------
+Thu Aug 4 22:08:10 UTC 2022 - Peter Simons <[email protected]>
+
+- Update criterion-measurement to version 0.1.4.0.
+ 0.1.4.0
+
+ * Fix a bug that occurred with GHC 9.2.4 or later that would cause incorrect
+ measurements.
+
+-------------------------------------------------------------------
Old:
----
criterion-measurement-0.1.3.0.tar.gz
New:
----
criterion-measurement-0.2.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-criterion-measurement.spec ++++++
--- /var/tmp/diff_new_pack.rec6sR/_old 2022-10-13 15:41:41.026683880 +0200
+++ /var/tmp/diff_new_pack.rec6sR/_new 2022-10-13 15:41:41.030683887 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-criterion-measurement
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%global pkg_name criterion-measurement
Name: ghc-%{pkg_name}
-Version: 0.1.3.0
+Version: 0.2.0.0
Release: 0
Summary: Criterion measurement functionality and associated types
License: BSD-3-Clause
++++++ criterion-measurement-0.1.3.0.tar.gz ->
criterion-measurement-0.2.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/criterion-measurement-0.1.3.0/changelog.md
new/criterion-measurement-0.2.0.0/changelog.md
--- old/criterion-measurement-0.1.3.0/changelog.md 2001-09-09
03:46:40.000000000 +0200
+++ new/criterion-measurement-0.2.0.0/changelog.md 2001-09-09
03:46:40.000000000 +0200
@@ -1,3 +1,14 @@
+0.2.0.0
+
+* Add a `measPeakMbAllocated` field to `Measured` for reporting maximum
+ megabytes allocated. Naturally, this affects the behavior of `Measured`'s
+ `{To,From}JSON` and `Binary` instances.
+
+0.1.4.0
+
+* Fix a bug that occurred with GHC 9.2.4 or later that would cause incorrect
+ measurements.
+
0.1.3.0
* Change `criterion_rdtsc` to return `mach_absolute_time` on macOS. This is a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/criterion-measurement-0.1.3.0/criterion-measurement.cabal
new/criterion-measurement-0.2.0.0/criterion-measurement.cabal
--- old/criterion-measurement-0.1.3.0/criterion-measurement.cabal
2001-09-09 03:46:40.000000000 +0200
+++ new/criterion-measurement-0.2.0.0/criterion-measurement.cabal
2001-09-09 03:46:40.000000000 +0200
@@ -1,5 +1,5 @@
name: criterion-measurement
-version: 0.1.3.0
+version: 0.2.0.0
synopsis: Criterion measurement functionality and associated types
description: Measurement-related functionality extracted from
Criterion, with minimal dependencies. The rationale for this is to enable
alternative analysis front-ends.
homepage: https://github.com/haskell/criterion
@@ -22,8 +22,9 @@
GHC==8.4.4,
GHC==8.6.5,
GHC==8.8.4,
- GHC==8.10.4,
- GHC==9.0.1
+ GHC==8.10.7,
+ GHC==9.0.2,
+ GHC==9.2.2
flag fast
description: compile without optimizations
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/criterion-measurement-0.1.3.0/src/Criterion/Measurement/Types/Internal.hs
new/criterion-measurement-0.2.0.0/src/Criterion/Measurement/Types/Internal.hs
---
old/criterion-measurement-0.1.3.0/src/Criterion/Measurement/Types/Internal.hs
2001-09-09 03:46:40.000000000 +0200
+++
new/criterion-measurement-0.2.0.0/src/Criterion/Measurement/Types/Internal.hs
2001-09-09 03:46:40.000000000 +0200
@@ -20,6 +20,7 @@
module Criterion.Measurement.Types.Internal (fakeEnvironment, nf', whnf') where
import Data.Int (Int64)
+import Control.Exception
-- | A dummy environment that is passed to functions that create benchmarks
-- from environments when no concrete environment is available.
@@ -45,7 +46,17 @@
-- benchmark code itself could be changed by the user's optimization level. By
-- marking them @NOINLINE@, the core benchmark code is always the same.
--
--- See #183 and #184 for discussion.
+-- Finally, it's important that both branches of the loop depend on the state
+-- token from the IO action. This is achieved by using `evaluate` rather than
`let !y = f x`
+-- in order to force the value to whnf. `evaluate` is in the IO monad and
therefore the state
+-- token needs to be passed through the loop.
+--
+-- See ghc#21948 where a change in eta-expansion behaviour
+-- caused the work to be performed in the wrong place because the otherwise
branch
+-- did not depend on the state token at all, and the whole loop could be
evaluated to
+-- a single return function before being run in the IO monad.
+--
+-- See #183, #184 and #264 for discussion.
-- | Generate a function which applies an argument to a function a
-- given number of times, reducing the result to normal form.
@@ -53,8 +64,9 @@
nf' reduce f x = go
where
go n | n <= 0 = return ()
- | otherwise = let !y = f x
- in reduce y `seq` go (n-1)
+ | otherwise = do
+ y <- evaluate (f x)
+ reduce y `seq` go (n-1)
{-# NOINLINE nf' #-}
-- | Generate a function which applies an argument to a function a
@@ -63,5 +75,7 @@
whnf' f x = go
where
go n | n <= 0 = return ()
- | otherwise = f x `seq` go (n-1)
+ | otherwise = do
+ _ <- evaluate (f x)
+ go (n-1)
{-# NOINLINE whnf' #-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/criterion-measurement-0.1.3.0/src/Criterion/Measurement/Types.hs
new/criterion-measurement-0.2.0.0/src/Criterion/Measurement/Types.hs
--- old/criterion-measurement-0.1.3.0/src/Criterion/Measurement/Types.hs
2001-09-09 03:46:40.000000000 +0200
+++ new/criterion-measurement-0.2.0.0/src/Criterion/Measurement/Types.hs
2001-09-09 03:46:40.000000000 +0200
@@ -125,6 +125,8 @@
, measAllocated :: !Int64
-- ^ __(GC)__ Number of bytes allocated. Access using 'fromInt'.
+ , measPeakMbAllocated :: !Int64
+ -- ^ __(GC)__ Max number of megabytes allocated. Access using 'fromInt'.
, measNumGcs :: !Int64
-- ^ __(GC)__ Number of garbage collections performed. Access
-- using 'fromInt'.
@@ -148,11 +150,11 @@
instance FromJSON Measured where
parseJSON v = do
- (a,b,c,d,e,f,g,h,i,j,k) <- parseJSON v
+ (a,b,c,d,e,f,g,h,i,j,k,l) <- parseJSON v
-- The first four fields are not subject to the encoding policy:
return $ Measured a b c d
- (int e) (int f) (int g)
- (db h) (db i) (db j) (db k)
+ (int e) (int f) (int g) (int h)
+ (db i) (db j) (db k) (db l)
where int = toInt; db = toDouble
-- Here we treat the numeric fields as `Maybe Int64` and `Maybe Double`
@@ -161,7 +163,7 @@
instance ToJSON Measured where
toJSON Measured{..} = toJSON
(measTime, measCpuTime, measCycles, measIters,
- i measAllocated, i measNumGcs, i measBytesCopied,
+ i measAllocated, i measPeakMbAllocated, i measNumGcs, i measBytesCopied,
d measMutatorWallSeconds, d measMutatorCpuSeconds,
d measGcWallSeconds, d measGcCpuSeconds)
where i = fromInt; d = fromDouble
@@ -186,6 +188,8 @@
"loop iterations"))
, ("allocated", (fmap fromIntegral . fromInt . measAllocated,
"(+RTS -T) bytes allocated"))
+ , ("peakMbAllocated", (fmap fromIntegral . fromInt . measPeakMbAllocated,
+ "(+RTS -T) peak megabytes allocated"))
, ("numGcs", (fmap fromIntegral . fromInt . measNumGcs,
"(+RTS -T) number of garbage collections"))
, ("bytesCopied", (fmap fromIntegral . fromInt . measBytesCopied,
@@ -260,10 +264,10 @@
instance Binary Measured where
put Measured{..} = do
put measTime; put measCpuTime; put measCycles; put measIters
- put measAllocated; put measNumGcs; put measBytesCopied
+ put measAllocated; put measPeakMbAllocated; put measNumGcs; put
measBytesCopied
put measMutatorWallSeconds; put measMutatorCpuSeconds
put measGcWallSeconds; put measGcCpuSeconds
- get = Measured <$> get <*> get <*> get <*> get
+ get = Measured <$> get <*> get <*> get <*> get <*> get
<*> get <*> get <*> get <*> get <*> get <*> get <*> get
-- | Apply an argument to a function, and evaluate the result to
@@ -563,7 +567,7 @@
-- ^ Action that creates the environment for a single run.
-> (env -> IO b)
-- ^ Function returning the IO action that should be benchmarked with the
- -- newly genereted environment.
+ -- newly generated environment.
-> Benchmarkable
perRunEnv alloc = perRunEnvWithCleanup alloc noop
@@ -578,7 +582,7 @@
-- ^ Clean up the created environment.
-> (env -> IO b)
-- ^ Function returning the IO action that should be benchmarked with the
- -- newly genereted environment.
+ -- newly generated environment.
-> Benchmarkable
perRunEnvWithCleanup alloc clean work = bm { perRun = True }
where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/criterion-measurement-0.1.3.0/src/Criterion/Measurement.hs
new/criterion-measurement-0.2.0.0/src/Criterion/Measurement.hs
--- old/criterion-measurement-0.1.3.0/src/Criterion/Measurement.hs
2001-09-09 03:46:40.000000000 +0200
+++ new/criterion-measurement-0.2.0.0/src/Criterion/Measurement.hs
2001-09-09 03:46:40.000000000 +0200
@@ -182,7 +182,7 @@
measure :: Benchmarkable -- ^ Operation to benchmark.
-> Int64 -- ^ Number of iterations.
-> IO (Measured, Double)
-measure bm iters = runBenchmarkable bm iters addResults $ \ !n act -> do
+measure bm iters = runBenchmarkable bm iters combineResults $ \ !n act -> do
-- Ensure the stats from getGCStatistics are up-to-date
-- by garbage collecting. performMinorGC does /not/ update all stats, but
-- it does update the ones we need (see applyGCStatistics for details.
@@ -216,10 +216,14 @@
where
-- When combining runs, the Measured value is accumulated over many runs,
-- but the Double value is the most recent absolute measurement of time.
- addResults :: (Measured, Double) -> (Measured, Double) -> (Measured,
Double)
- addResults (!m1, _) (!m2, !d2) = (m3, d2)
+ combineResults :: (Measured, Double) -> (Measured, Double) -> (Measured,
Double)
+ combineResults (!m1, _) (!m2, !d2) = (m3, d2)
where
- add f = f m1 + f m2
+ combine :: (a -> a -> a) -> (Measured -> a) -> a
+ combine g sel = sel m1 `g` sel m2
+
+ add :: Num a => (Measured -> a) -> a
+ add = combine (+)
m3 = Measured
{ measTime = add measTime
@@ -228,6 +232,7 @@
, measIters = add measIters
, measAllocated = add measAllocated
+ , measPeakMbAllocated = combine max measPeakMbAllocated
, measNumGcs = add measNumGcs
, measBytesCopied = add measBytesCopied
, measMutatorWallSeconds = add measMutatorWallSeconds
@@ -334,6 +339,7 @@
, measIters = 0
, measAllocated = minBound
+ , measPeakMbAllocated = minBound
, measNumGcs = minBound
, measBytesCopied = minBound
, measMutatorWallSeconds = bad
@@ -360,6 +366,7 @@
-- The others (num GCs and GC cpu/wall seconds) must be diffed against
-- endPreGC so that the extra performGC does not taint them.
measAllocated = diff endPostGC gcStatsBytesAllocated
+ , measPeakMbAllocated = gcStatsPeakMegabytesAllocated endPostGC
, measNumGcs = diff endPreGC gcStatsNumGcs
, measBytesCopied = diff endPostGC gcStatsBytesCopied
, measMutatorWallSeconds = diff endPostGC gcStatsMutatorWallSeconds