statgrab 0.1.0 → 0.1.1
raw patch · 3 files changed
+10/−11 lines, 3 files
Files
- README.md +6/−9
- src/System/Statgrab.hs +1/−1
- statgrab.cabal +3/−1
README.md view
@@ -26,10 +26,12 @@ Please see the `libstatgrab` [homepage](http://www.i-scream.org/libstatgrab/) for more information. +Further documentation can be found on [Hackage](http://hackage.haskell.org/package/statgrab). + ## Compatibility -`libstatgrab 0.9.0` is required.+`libstatgrab` `0.9.0` is required. While the bindings should correctly build on the same platforms as supported by the library, only OSX and Linux have currently been tested.@@ -37,11 +39,8 @@ ## Installation -Install `libstatgrab 0.9.0` from one of the mirrors: http://www.i-scream.org/libstatgrab/--```-cabal install-```+Install `libstatgrab` `0.9.0` from a [mirror](http://www.i-scream.org/mirrors.xhtml),+and then run `cabal install`. ## Examples@@ -53,9 +52,7 @@ import System.Statgrab main :: IO ()-main = runStats $ do- h <- snapshot :: Stats Host- liftIO $ print h+main = runStats $ (snapshot :: Stats Host) >>= liftIO . print ```
src/System/Statgrab.hs view
@@ -72,7 +72,7 @@ deriving (Applicative, Functor, Monad, MonadIO, MonadCatchIO) -- | Run the 'Stats' Monad, bracketing libstatgrab's sg_init and sg_shutdown--- calls via reference counting.+-- calls via reference counting to ensure reentrancy. runStats :: MonadCatchIO m => Stats a -> m a runStats = liftIO . bracket (sg_init 0 >> sg_drop_privileges >> newIORef 1) destroy
statgrab.cabal view
@@ -1,5 +1,5 @@ name: statgrab-version: 0.1.0+version: 0.1.1 synopsis: Collect system level metrics and statistics homepage: http://github.com/brendanhay/statgrab license: OtherLicense@@ -27,6 +27,8 @@ . * Be aware that currently these bindings have been developed and tested only on OSX/Linux.+ .+ Haddock documentation can also be found on [GitHub](http://brendanhay.github.io/statgrab/System-Statgrab.html). extra-source-files: README.md