module BuildBox.Data.Detail
( Detail (..)
, Timed (..)
, Used (..)
, Sized (..))
where
import BuildBox.Pretty
data Detail
= DetailTimed Timed
| DetailUsed Used
| DetailSized Sized
deriving (Eq, Ord, Show, Read)
data Timed
= TotalWall
| TotalCpu
| TotalSys
| KernelWall
| KernelCpu
| KernelSys
deriving (Eq, Ord, Show, Read, Enum)
instance Pretty Timed where
ppr timed
= case timed of
TotalWall -> string "runtime (wall clock)"
TotalCpu -> string "runtime (cpu usage)"
TotalSys -> string "runtime (sys usage)"
KernelWall -> string "kernel runtime (wall clock)"
KernelCpu -> string "kernel runtime (cpu usage)"
KernelSys -> string "kernel runtime (sys usage)"
data Used
= HeapMax
| HeapAlloc
deriving (Eq, Ord, Show, Read, Enum)
instance Pretty Used where
ppr used
= case used of
HeapMax -> string "maximum heap usage"
HeapAlloc -> string "heap allocation"
data Sized
= ExeSize
deriving (Eq, Ord, Show, Read, Enum)
instance Pretty Sized where
ppr sized
= case sized of
ExeSize -> string "executable size"