hsbencher-1.20.0.2: Launch and gather data from Haskell and non-Haskell benchmarks.

Safe HaskellNone
LanguageHaskell2010

HSBencher.Internal.BenchSpace

Description

Code for dealing with the BenchSpace datatype.

Synopsis

Documentation

data BenchSpace meaning Source

A datatype for describing (generating) benchmark configuration spaces. This is accomplished by nested conjunctions and disjunctions. For example, varying threads from 1-32 would be a 32-way Or. Combining that with profiling on/off (product) would create a 64-config space.

While the ParamSetting provides an *implementation* of the behavior, this datatype can also be decorated with a (more easily machine readable) meaning of the corresponding setting. For example, indicating that the setting controls the number of threads.

Constructors

And [BenchSpace meaning] 
Or [BenchSpace meaning] 
Set meaning ParamSetting 

Instances

Eq meaning => Eq (BenchSpace meaning) 
Ord meaning => Ord (BenchSpace meaning) 
Read meaning => Read (BenchSpace meaning) 
Show meaning => Show (BenchSpace meaning) 
Generic (BenchSpace meaning) 
Out a => Out (BenchSpace a) 
type Rep (BenchSpace meaning) 

enumerateBenchSpace :: BenchSpace a -> [[(a, ParamSetting)]] Source

Exhaustively compute all configurations described by a benchmark configuration space.

benchSpaceSize :: BenchSpace a -> Int Source

The size of a configuration space. This is equal to the length of the result returned by enumerateBenchSpace, but is quicker to compute.

filterBenchmarks Source

Arguments

:: [String]

Patterns which must all be matched.

-> [Benchmark DefaultParamMeaning] 
-> [Benchmark DefaultParamMeaning] 

Filter down a list of benchmarks (and their configuration spaces) to only those that have ALL of the pattern arguments occurring somewhere in their printed representation.

This completely removes any benchmark with an empty configuration space (`Or []`).

filterBenchmark Source

Arguments

:: [String]

Patterns which must all be matched.

-> Benchmark DefaultParamMeaning 
-> Benchmark DefaultParamMeaning 

Filter down the config space of a benchmark, to only those configurations that have a match for ALL of the pattern arguments occurring somewhere inside them.

A note on semantics:

A benchmark (with its config space) implies a STREAM of concrete benchmark instances.

Each pattern filters out a subset of these instances (either by matching a varying field like RuntimeEnv or a static field like progname). This function conjoins all the patterns and thus returns a benchmark that iterates over the INTERSECTION of those subsets implied by each pattern, respectively.

disjunctiveNF :: BenchSpace a -> BenchSpace a Source

Convert to disjunctive normal form. This can be an exponential increase in the size of the value.