mirror of
https://github.com/github/semantic.git
synced 2024-11-24 00:42:33 +03:00
Take the count as a parameter.
This commit is contained in:
parent
b20dd87a48
commit
207c0ac24c
@ -12,12 +12,12 @@ import Test.QuickCheck
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
benchmarks <- sequenceA [ generativeBenchmark "numberedRows" length (nf (numberedRows :: [Join These ()] -> [Join These (Int, ())])) ]
|
||||
benchmarks <- sequenceA [ generativeBenchmark "numberedRows" 10 length (nf (numberedRows :: [Join These ()] -> [Join These (Int, ())])) ]
|
||||
defaultMain benchmarks
|
||||
|
||||
generativeBenchmark :: (Arbitrary a, Show m) => String -> (a -> m) -> (a -> Benchmarkable) -> IO Benchmark
|
||||
generativeBenchmark name metric benchmark = do
|
||||
benchmarks <- traverse measure (replicate 10 defaultSize)
|
||||
generativeBenchmark :: (Arbitrary a, Show m) => String -> Int -> (a -> m) -> (a -> Benchmarkable) -> IO Benchmark
|
||||
generativeBenchmark name n metric benchmark = do
|
||||
benchmarks <- traverse measure (replicate n defaultSize)
|
||||
pure $! bgroup name benchmarks
|
||||
where measure n = do
|
||||
input <- generate (resize n arbitrary)
|
||||
|
Loading…
Reference in New Issue
Block a user