packages feed

hp2any-core 0.11.1 → 0.11.2

raw patch · 3 files changed

+23/−9 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Profiling.Heap.Types: Profile :: ![(Time, ProfileSample)] -> !IntMap CostCentreName -> !Trie CostCentreId -> !String -> !String -> Profile
+ Profiling.Heap.Types: Profile :: ![(Time, ProfileSample)] -> !(IntMap CostCentreName) -> !(Trie CostCentreId) -> !String -> !String -> Profile
- Profiling.Heap.Types: class ProfileQuery p
+ Profiling.Heap.Types: class ProfileQuery p where ccName p ccId = findWithDefault empty ccId (ccNames p) samplesIvl p t1 t2 = takeWhile ((< t2) . fst) $ dropWhile ((< t1) . fst) $ samples p minTime p | null smp = 0 | otherwise = fst (head smp) where smp = samples p maxTime p | null smp = 0 | otherwise = fst (last smp) where smp = samples p maxCost p = maximum $ 0 : [c | (_, s) <- samples p, (_, c) <- s] maxCostTotal p = maximum $ 0 : [sum (map snd s) | (_, s) <- samples p] maxCostIvl p t1 t2 = maximum $ 0 : [c | (_, s) <- samplesIvl p t1 t2, (_, c) <- s] maxCostTotalIvl p t1 t2 = maximum $ 0 : [sum (map snd s) | (_, s) <- samplesIvl p t1 t2] integral = integral' . samples integralIvl p t1 t2 = integral' (samplesIvl p t1 t2)
- Profiling.Heap.Types: prNames :: Profile -> !IntMap CostCentreName
+ Profiling.Heap.Types: prNames :: Profile -> !(IntMap CostCentreName)
- Profiling.Heap.Types: prNamesInv :: Profile -> !Trie CostCentreId
+ Profiling.Heap.Types: prNamesInv :: Profile -> !(Trie CostCentreId)

Files

CHANGES view
@@ -1,3 +1,9 @@+0.11.2 - 130304+* various improvements by Takano Akio and Sönke Hahn++0.11.1 - 111117+* improved parsing performance by Claude Heiland-Allen+ 0.10.1 - 110413 * cleaned up warnings 
Profiling/Heap/Read.hs view
@@ -28,6 +28,8 @@ import Control.Monad import Control.Monad.Fix import Control.Concurrent+import Control.Exception (SomeException, catch)+import Prelude hiding (catch) import Data.IORef import System.Directory import System.FilePath@@ -69,7 +71,7 @@ by the heap profiler (a file with .hp extension). -}  readProfile :: FilePath -> IO (Maybe Profile)-readProfile file = flip catch (const (return Nothing)) $ do+readProfile file = flip catch (const (return Nothing) :: SomeException -> IO (Maybe a)) $ do   hdl <- openFile file ReadMode   let parse !stime !prof = do         stop <- hIsEOF hdl@@ -207,7 +209,7 @@             '/' : (takeFileName . execPath . cmdspec) prog ++ ".hp"    -- We have to delete the .hp file and wait for the process to create it.-  catch (removeFile hpPath) (const (return ()))+  catch (removeFile hpPath) (const (return ()) :: SomeException -> IO ())   (_,_,_,phdl) <- createProcess prog    -- Unfortunately this doesn't seem to work in Windows due to file@@ -290,7 +292,8 @@   tid <- forkIO . fix $ \readLoop -> do     -- We assume line buffering here. Also, if there seems to be     -- any error, the profile reader is stopped.-    msg <- catch (readMsg <$> hGetLine hdl) (const . return . Just . Stream $ SinkStop)+    msg <- catch (readMsg <$> hGetLine hdl)+                ((const . return . Just . Stream $ SinkStop) :: SomeException -> IO (Maybe Message))     case msg >>= getStream of       Just profSmp -> do         sink profSmp@@ -309,9 +312,10 @@  tryRepeatedly :: IO a -> Int -> Int -> IO (Maybe a) tryRepeatedly act n d | n < 1     = return Nothing-                      | otherwise = catch (Just <$> act) (const retry)-    where retry = do threadDelay d-                     tryRepeatedly act (n-1) d+                      | otherwise = catch (Just <$> act) retry+    where retry e = do let _ = e :: SomeException+                       threadDelay d+                       tryRepeatedly act (n-1) d  {- 
hp2any-core.cabal view
@@ -1,6 +1,6 @@ Name:          hp2any-core-Version:       0.11.1-Cabal-Version: >= 1.2+Version:       0.11.2+Cabal-Version: >= 1.6 Synopsis:      Heap profiling helper library Category:      profiling, development, utils Description:@@ -12,7 +12,7 @@  Author:        Patai Gergely Maintainer:    Patai Gergely (patai.gergely@gmail.com)-Copyright:     (c) 2009-2011, Patai Gergely+Copyright:     (c) 2009-2013, Patai Gergely Homepage:      http://www.haskell.org/haskellwiki/Hp2any License:       BSD3 License-File:  LICENSE@@ -42,3 +42,7 @@                  bytestring, attoparsec   ghc-options:   -Wall -O2   ghc-prof-options: -prof -auto-all -caf-all++source-repository head+  type:     git+  location: https://github.com/cobbpg/hp2any.git