base-4.12.0.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: base-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: base-4.10.0.0

Constructors

RTSStats 

Fields

Instances
Read RTSStats #

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Show RTSStats #

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

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

Instances
Read GCDetails #

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

Show GCDetails #

Since: base-4.10.0.0

Instance details

Defined in GHC.Stats

type RtsTime = Int64 #

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

getRTSStats :: IO RTSStats #

Get current runtime system statistics.

Since: base-4.10.0.0

getRTSStatsEnabled :: IO Bool #

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

Since: base-4.10.0.0