Safe Haskell | None |
---|---|
Language | Haskell2010 |
analytical functionality for perf
- deciles :: (Functor f, Foldable f, Integral a) => a -> f a -> [Double]
- percentile :: (Functor f, Foldable f, Integral a) => Double -> f a -> Double
- prec :: Int -> Format r (Scientific -> r)
- int2Sci :: Integral a => a -> Scientific
- formatInt :: Integral a => Text -> Int -> a -> Text
- formatRun :: Integral a => Text -> Int -> [a] -> Text
- formatRunHeader :: Text
- formatGap :: Integral a => Int -> (a, ([a], b)) -> Text
- code :: [Text] -> Text
Documentation
deciles :: (Functor f, Foldable f, Integral a) => a -> f a -> [Double] Source #
compute deciles
>>>
deciles 5 [1..1000]
[1.0,200.5,400.5,600.5,800.5,1000.0]
c5 <- decile 5 <$> ticks n f a
percentile :: (Functor f, Foldable f, Integral a) => Double -> f a -> Double Source #
compute a percentile
>>>
percentile 0.1 [1..1000]
100.5
c <- percentile 0.4 . fst <$> ticks n f a
int2Sci :: Integral a => a -> Scientific Source #
convert an integral to a Scientific
>>>
sformat (left 8 ' ' %. prec 1) (int2Sci 1000)
" 1.0e3"
formatInt :: Integral a => Text -> Int -> a -> Text Source #
format an Integral as a Scientific with a label and precision
formatRun :: Integral a => Text -> Int -> [a] -> Text Source #
format the first 5 results, and then the 40th percentile
formatRunHeader :: Text Source #
header for formatRun