summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2017-06-02 11:52:41 -0400
committerBen Gamari <ben@smart-cactus.org>2017-06-02 12:27:46 -0400
commit811a2986475d88f73bb22b4600970039e1b582d6 (patch)
treee30bf0e41e451ed106af27b0d2e1c689f0dd7208
parent2abe54e16cbd14cab27abdc7967e907753354d54 (diff)
downloadhaskell-811a2986475d88f73bb22b4600970039e1b582d6.tar.gz
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
-rw-r--r--libraries/base/GHC/Stats.hsc8
1 files 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