perf-analysis-0.0.1.1: 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 :: Int -> Format r (Scientific -> r) Source #

fixed precision for a Scientific

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

formatGap :: Integral a => Int -> (a, ([a], b)) -> Text Source #

format a tick result with an inside and outside measurement

code :: [Text] -> Text Source #

place markdown backtics around text