summaryrefslogtreecommitdiff
path: root/Prof.hs
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2020-10-27 13:12:58 +0100
committerTom Smeding <tom.smeding@gmail.com>2020-10-27 13:12:58 +0100
commitc23b7b5517d7ac5d0a6b2ff8a4f4914c2f392261 (patch)
treebf6b6125593f7aa1877f59bd9f964ed9bab37a7a /Prof.hs
Initial
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)