diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-10-27 13:12:58 +0100 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-10-27 13:12:58 +0100 |
commit | c23b7b5517d7ac5d0a6b2ff8a4f4914c2f392261 (patch) | |
tree | bf6b6125593f7aa1877f59bd9f964ed9bab37a7a /Prof.hs |
Initial
Diffstat (limited to 'Prof.hs')
-rw-r--r-- | Prof.hs | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -0,0 +1,28 @@ +{-# LANGUAGE DeriveFunctor #-} +module Prof where + +import Data.ByteString.Short (ShortByteString) + + +data Prof a + = Prof { pTree :: ProfTree a } + deriving (Show, Functor) + +data ProfTree a + = Leaf Entry + | Node Entry a [ProfTree a] + deriving (Show, Functor) + +data Entry + = Entry { eCS :: ShortByteString + , eModule :: ShortByteString + , eSrc :: ShortByteString + , eCount :: Int + , eIndividual :: TimeShare + , eInherited :: TimeShare } + deriving (Show) + +data TimeShare + = TimeShare { tsTime :: Double + , tsAlloc :: Double } + deriving (Show) |