perf-analysis-0.3.0: analysis example using perf

Safe HaskellNone
LanguageHaskell2010

Perf.Analysis

Description

analytical functionality for perf

Synopsis

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

prec :: Real a => Int -> a -> Text Source #

fixed precision

fixed :: Real a => Int -> a -> Text Source #

fixed

sciprec :: Int -> Scientific -> Text Source #

fixed precision for a Scientific

commas :: RealFrac a => Int -> a -> Text Source #

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

formatF :: RealFloat a => Int -> a -> Text Source #

format a Float as a Scientific with a precision

formatFixed :: RealFloat a => Int -> a -> Text Source #

format a Float as a Scientific with a precision

formatRun :: Integral a => Text -> Int -> Int -> [a] -> [Text] Source #

format the first few results, the median and average

formatRunTime :: Integral a => Text -> Double -> Int -> [a] -> [Text] Source #

average and time

formatRuns :: Integral a => Int -> Int -> [(Text, [a])] -> Block Source #

formatRunsTime :: Integral a => Double -> Int -> [(Text, [a])] -> Block Source #