SBench-0.2.0: A benchmark suite for runtime and heap measurements over a series of inputs.

Safe HaskellNone

Test.SBench.Space.Single.Test

Synopsis

Documentation

getProfile :: TestOpts -> Algorithm (a -> b) -> Data a -> FilePath -> IO FilePathSource

Create only the heap profile.

getMaxMemSource

Arguments

:: NormalInput

Shall input be normalized first? (Boolean value)

-> Algorithm (a -> b)

The algorithm to test

-> Data a

The test input

-> FilePath

File the program generated for measurements is stored to. More precise: the files, i.e. source code, executable, heap profile, intermediate files during build

-> IO Integer

Maximal heap used.

Get the maximal heap occupied by the algorithm. Since the algorithms comes with a cost center annotation this is used to explore what heap consumption should be measured (here: all heap directly or indirectly used by the given algorithm).

getMaxMemWith :: TestOpts -> Algorithm (a -> b) -> Data a -> FilePath -> IO IntegerSource

As getMaxMem, but TestOpts can be set by the user.

getMemLineSource

Arguments

:: NormalInput

Shall input be normalized first? (Boolean value)

-> (FilePath, Title)

Name of the generated .sbench file and all intermediate files (e.g. .hs, .hp)

-> Algorithm (a -> b)

The algorithm to test

-> Data a

The test input

-> IO [(Double, Integer)] 

The function generates a heap profile, returns the heapconsumption over time as series and also stores the series as an .sbench file.