2021-04-13 20:32:29 +03:00
|
|
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
2021-09-24 01:56:37 +03:00
|
|
|
|
2021-04-13 20:32:29 +03:00
|
|
|
-- | A convenience wrapper around "GHC.Stats", which makes RTS stats available
|
|
|
|
-- (when the program is run with +RTS -T)
|
|
|
|
module GHC.Stats.Extended
|
2021-09-24 01:56:37 +03:00
|
|
|
( module GHC.Stats,
|
|
|
|
)
|
|
|
|
where
|
2021-04-13 20:32:29 +03:00
|
|
|
|
2021-09-24 01:56:37 +03:00
|
|
|
import Data.Aeson qualified as A
|
|
|
|
import Data.Aeson.TH qualified as A
|
|
|
|
import GHC.Stats
|
2021-04-13 20:32:29 +03:00
|
|
|
|
|
|
|
$(A.deriveToJSON A.defaultOptions ''GCDetails)
|
|
|
|
$(A.deriveToJSON A.defaultOptions ''RTSStats)
|
|
|
|
|
|
|
|
{- for base >= 4.15
|
|
|
|
instance A.ToJSON S.GCDetails where
|
|
|
|
toEncoding = A.genericToEncoding A.defaultOptions
|
|
|
|
|
|
|
|
instance A.ToJSON S.RTSStats where
|
|
|
|
toEncoding = A.genericToEncoding A.defaultOptions
|
|
|
|
-}
|