From 811a2986475d88f73bb22b4600970039e1b582d6 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Fri, 2 Jun 2017 11:52:41 -0400 Subject: GHC.Stats cleanup This does two things: * The `RtsTime` type wasn't exported, but it is used as the type of several record fields. Let's export it and give it some documentation. * Neither `RTSStats` nor `GCDetails` have `Read` or `Show` instances, but `GCStats` does! Let's fix this discrepancy. Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: goldfire, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3625 --- libraries/base/GHC/Stats.hsc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/base/GHC/Stats.hsc b/libraries/base/GHC/Stats.hsc index d5d48f5e61..c4e2e809f8 100644 --- a/libraries/base/GHC/Stats.hsc +++ b/libraries/base/GHC/Stats.hsc @@ -15,7 +15,7 @@ module GHC.Stats ( -- * Runtime statistics - RTSStats(..), GCDetails(..) + RTSStats(..), GCDetails(..), RtsTime , getRTSStats , getRTSStatsEnabled @@ -104,7 +104,7 @@ data RTSStats = RTSStats { -- | Details about the most recent GC , gc :: GCDetails - } + } deriving (Read, Show) -- -- | Statistics about a single GC. This is a mirror of the C @struct @@ -138,9 +138,9 @@ data GCDetails = GCDetails { , gcdetails_cpu_ns :: RtsTime -- | The time elapsed during GC itself , gcdetails_elapsed_ns :: RtsTime - } - + } deriving (Read, Show) +-- | Time values from the RTS, using a fixed resolution of nanoseconds. type RtsTime = Int64 -- @since 4.9.0.0 -- cgit v1.2.1