weigh: Measure allocations of a Haskell functions/values

[ bsd3, library, web ] [ Propose Tags ]

Please see README.md


[Skip to Readme]
Versions 0.0.0, 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 0.0.12
Change log CHANGELOG
Dependencies base (>=4.7 && <5), deepseq, mtl, process, split, temporary [details]
License BSD-3-Clause
Copyright FP Complete
Author Chris Done
Maintainer chrisdone@fpcomplete.com
Category Web
Home page https://github.com/fpco/weigh#readme
Uploaded by ChrisDone at Thu May 17 08:19:09 UTC 2018
Distributions LTSHaskell:0.0.12, NixOS:0.0.12, Stackage:0.0.12
Downloads 2696 total (240 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-05-17 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for weigh-0.0.12

[back to package description]

weigh Build Status

Measures the memory usage of a Haskell value or function

Example use

import Weigh

main :: IO ()
main =
  mainWith
    (do func "integers count 0" count 0
        func "integers count 1" count 1
        func "integers count 10" count 10
        func "integers count 100" count 100)
  where
    count :: Integer -> ()
    count 0 = ()
    count a = count (a - 1)

Output results:

|Case|Allocated|GCs| |:---|---:|---:| |integers count 0|16|0| |integers count 1|88|0| |integers count 10|736|0| |integers count 100|7,216|0|

Output by default is plain text table; pass --markdown to get a markdown output like the above.