base-4.10.1.0: Basic libraries

Safe HaskellTrustworthy
LanguageHaskell2010

GHC.Stats

Contents

Description

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

Synopsis

Runtime statistics

data RTSStats #

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

Constructors

RTSStats 

Fields

data GCDetails #

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.

Constructors

GCDetails 

Fields

type RtsTime = Int64 #

Time values from the RTS, using a fixed resolution of nanoseconds.

getRTSStatsEnabled :: IO Bool #

Returns whether GC stats have been enabled (with +RTS -T, for example).

Since: 4.9.0.0

DEPRECATED, don't use

data GCStats #

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

Constructors

GCStats

Deprecated: Use RTSStats instead. This will be removed in GHC 8.4.1

Fields

getGCStats :: IO GCStats #

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 #

Deprecated: use getRTSStatsEnabled instead. This will be removed in GHC 8.4.1