summaryrefslogtreecommitdiff
path: root/Prof.hs
blob: 28bfacac578bd96b9a5a6ff482e4c37cff321d25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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)