| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Circuit.Meter.Space
Contents
Description
Space measurement as a Circuit.
GHC RTS allocation statistics read before and after a computation.
allocX measures allocated bytes; SpaceStats is available for
users who want the full RTS snapshot.
Space meter
allocGC :: Meter (K IO) Bytes Bytes Source #
Measure allocated bytes with GC-forced boundaries.
Forces a major GC before reading the counter at both start and stop. This gives accurate per-interval allocation at the cost of GC overhead (a stop-the-world collection on every measurement boundary).
Use allocX for lightweight (but potentially stale) measurements;
use allocGC when you need accurate per-stage numbers.
Types
data SpaceStats Source #
Allocation statistics from the GHC RTS.
Constructors
| SpaceStats | |
Instances
| Monoid SpaceStats Source # | |
Defined in Circuit.Meter.Space Methods mempty :: SpaceStats # mappend :: SpaceStats -> SpaceStats -> SpaceStats # mconcat :: [SpaceStats] -> SpaceStats # | |
| Semigroup SpaceStats Source # | |
Defined in Circuit.Meter.Space Methods (<>) :: SpaceStats -> SpaceStats -> SpaceStats # sconcat :: NonEmpty SpaceStats -> SpaceStats # stimes :: Integral b => b -> SpaceStats -> SpaceStats # | |
| Eq SpaceStats Source # | |
Defined in Circuit.Meter.Space | |
| Read SpaceStats Source # | |
Defined in Circuit.Meter.Space Methods readsPrec :: Int -> ReadS SpaceStats # readList :: ReadS [SpaceStats] # readPrec :: ReadPrec SpaceStats # readListPrec :: ReadPrec [SpaceStats] # | |
| Show SpaceStats Source # | |
Defined in Circuit.Meter.Space Methods showsPrec :: Int -> SpaceStats -> ShowS # show :: SpaceStats -> String # showList :: [SpaceStats] -> ShowS # | |
Number of bytes.
Instances
| Monoid Bytes Source # | |
| Semigroup Bytes Source # | |
| Eq Bytes Source # | |
| Ord Bytes Source # | |
| Enum Bytes Source # | |
Defined in Circuit.Meter.Space | |
| Num Bytes Source # | |
| Read Bytes Source # | |
| Integral Bytes Source # | |
| Real Bytes Source # | |
Defined in Circuit.Meter.Space Methods toRational :: Bytes -> Rational # | |
| Show Bytes Source # | |