Safe Haskell | Trustworthy |
---|---|
Language | Haskell2010 |
This module provides access to internal garbage collection and
memory usage statistics. These statistics are not available unless
a program is run with the -T
RTS flag.
This module is GHC-only and should not be considered portable.
Since: 4.5.0.0
- data RTSStats = RTSStats {
- gcs :: Word32
- major_gcs :: Word32
- allocated_bytes :: Word64
- max_live_bytes :: Word64
- max_large_objects_bytes :: Word64
- max_compact_bytes :: Word64
- max_slop_bytes :: Word64
- max_mem_in_use_bytes :: Word64
- cumulative_live_bytes :: Word64
- copied_bytes :: Word64
- par_copied_bytes :: Word64
- cumulative_par_max_copied_bytes :: Word64
- mutator_cpu_ns :: RtsTime
- mutator_elapsed_ns :: RtsTime
- gc_cpu_ns :: RtsTime
- gc_elapsed_ns :: RtsTime
- cpu_ns :: RtsTime
- elapsed_ns :: RtsTime
- gc :: GCDetails
- data GCDetails = GCDetails {
- gcdetails_gen :: Word32
- gcdetails_threads :: Word32
- gcdetails_allocated_bytes :: Word64
- gcdetails_live_bytes :: Word64
- gcdetails_large_objects_bytes :: Word64
- gcdetails_compact_bytes :: Word64
- gcdetails_slop_bytes :: Word64
- gcdetails_mem_in_use_bytes :: Word64
- gcdetails_copied_bytes :: Word64
- gcdetails_par_max_copied_bytes :: Word64
- gcdetails_sync_elapsed_ns :: RtsTime
- gcdetails_cpu_ns :: RtsTime
- gcdetails_elapsed_ns :: RtsTime
- getRTSStats :: IO RTSStats
- getRTSStatsEnabled :: IO Bool
- data GCStats = GCStats {
- bytesAllocated :: !Int64
- numGcs :: !Int64
- maxBytesUsed :: !Int64
- numByteUsageSamples :: !Int64
- cumulativeBytesUsed :: !Int64
- bytesCopied :: !Int64
- currentBytesUsed :: !Int64
- currentBytesSlop :: !Int64
- maxBytesSlop :: !Int64
- peakMegabytesAllocated :: !Int64
- mblocksAllocated :: !Int64
- mutatorCpuSeconds :: !Double
- mutatorWallSeconds :: !Double
- gcCpuSeconds :: !Double
- gcWallSeconds :: !Double
- cpuSeconds :: !Double
- wallSeconds :: !Double
- parTotBytesCopied :: !Int64
- parMaxBytesCopied :: !Int64
- getGCStats :: IO GCStats
- getGCStatsEnabled :: IO Bool
Runtime statistics
Statistics about runtime activity since the start of the
program. This is a mirror of the C struct RTSStats
in RtsAPI.h
Since: 4.9.0.0
RTSStats | |
|
Statistics about a single GC. This is a mirror of the C struct
GCDetails
in RtsAPI.h
, with the field prefixed with gc_
to
avoid collisions with RTSStats
.
GCDetails | |
|
getRTSStats :: IO RTSStats Source #
getRTSStatsEnabled :: IO Bool Source #
Returns whether GC stats have been enabled (with +RTS -T
, for example).
Since: 4.9.0.0
DEPRECATED, don't use
Deprecated: Use RTSStats instead. This will be removed in GHC 8.4.1
Statistics about memory usage and the garbage collector. Apart from
currentBytesUsed
and currentBytesSlop
all are cumulative values since
the program started.
Since: 4.5.0.0
GCStats | Deprecated: Use RTSStats instead. This will be removed in GHC 8.4.1 |
|
getGCStats :: IO GCStats Source #
Deprecated: Use getRTSStats instead. This will be removed in GHC 8.4.1
Retrieves garbage collection and memory statistics as of the last
garbage collection. If you would like your statistics as recent as
possible, first run a performGC
.
Since: 4.5.0.0
getGCStatsEnabled :: IO Bool Source #
Deprecated: use getRTSStatsEnabled instead. This will be removed in GHC 8.4.1