summaryrefslogtreecommitdiff
path: root/Prof.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Prof.hs')
-rw-r--r--Prof.hs28
1 files changed, 28 insertions, 0 deletions
diff --git a/Prof.hs b/Prof.hs
new file mode 100644
index 0000000..28bfaca
--- /dev/null
+++ b/Prof.hs
@@ -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)