Safe Haskell | None |
---|---|
Language | Haskell2010 |
analytical functionality for perf
Synopsis
- deciles :: (Functor f, Foldable f, Integral a) => a -> f a -> [Double]
- percentile :: (Functor f, Foldable f, Integral a) => Double -> f a -> Double
- prec :: Real a => Int -> a -> Text
- fixed :: Real a => Int -> a -> Text
- sciprec :: Int -> Scientific -> Text
- commas :: RealFrac a => Int -> a -> Text
- int2Sci :: Integral a => a -> Scientific
- formatSecs :: RealFloat a => Int -> a -> Text
- formatI :: Integral a => Int -> a -> Text
- formatF :: RealFloat a => Int -> a -> Text
- formatFixed :: RealFloat a => Int -> a -> Text
- formatRun :: Integral a => Text -> Int -> Int -> [a] -> [Text]
- formatRunTime :: Integral a => Text -> Double -> Int -> [a] -> [Text]
- formatRuns :: Integral a => Int -> Int -> [(Text, [a])] -> Block
- formatRunsTime :: Integral a => Double -> Int -> [(Text, [a])] -> Block
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"
formatI :: Integral a => Int -> a -> Text Source #
format an Integral as a Scientific with a precision
formatFixed :: RealFloat a => Int -> a -> Text Source #
format a Float as a Scientific with a precision