pqc: Parallel batch driver for QuickCheck

[ bsd3, library, testing ] [ Propose Tags ]

Parallel batch driver for QuickCheck


[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1, 0.2, 0.3, 0.4, 0.4.1, 0.4.2, 0.5, 0.5.1, 0.5.1.1, 0.6, 0.7, 0.7.0.1, 0.7.1, 0.7.1.1, 0.7.1.2, 0.8
Dependencies base, QuickCheck [details]
License BSD-3-Clause
Author Don Stewart
Maintainer dons@cse.unsw.edu.au
Category Testing
Uploaded by DonaldStewart at 2007-01-25T08:23:17Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 10504 total (20 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for pqc-0.1

[back to package description]
------------------------------------------------------------------------
PQC: QuickCheck in the Age of Concurrency

An SMP parallel QuickCheck driver

------------------------------------------------------------------------
Quick start:
------------------------------------------------------------------------

Parallel batch driver for QuickCheck

Run your properties in chunks over multiple cpus.

Building (usual Cabal instructions):

    $ runhaskell Setup.lhs configure 
    $ runhaskell Setup.lhs build
    $ runhaskell Setup.lhs install

Example use in: examples/Example.hs

------------------------------------------------------------------------
Long story
------------------------------------------------------------------------

Do you:

    * Have (or want) lots of QuickCheck properties? 
    * Run them often (maybe on every darcs commit)? 
    * Tired of waiting for the testsuite to finish? 
    * Got a multi-core box with cpus sitting idle...? 
    
Yes? You need Parallel QuickCheck! 

PQC provides a single module: Test.QuickCheck.Parallel.  This is a
QuickCheck driver that runs property lists as jobs in parallel, and will
utilise as many cores as you wish, with the SMP parallel GHC 6.6
runtime. It is simple, scalable replacement for Test.QuickCheck.Batch.

An example, on a 4 cpu linux server, running 20 quickcheck properties.

    With 1 thread only:
        $ time ./a.out 1
        1: sort1                    : OK, 1000 tests.
        1: sort2                    : OK, 1000 tests.
        1: sort3                    : OK, 1000 tests.
        1: sort4                    : OK, 1000 tests.
        ...
        ./a.out 1 > x  18.94s user 0.01s system 99% cpu 18.963 total

    18 seconds, 99% cpu. But I've got another 3 2.80GHz processors sitting
    idle! Let's use them, to run the testsuite faster. No recompilation required.

    4 OS threads, 4 Haskell threads:
        $ time ./a.out 4 +RTS -N4 > /dev/null
        ./a.out 4 +RTS -N4 > /dev/null  20.65s user 0.22s system 283% cpu 7.349 total

    283% cpu, not bad. We're getting close to being limited by the
    length of the longest running test.

Or on a dual core macbook, thanks to Spencer Janssen for macbook data
and testing:

    1 thread:
        ./Example 1 
        17.256s

    2 thread:
        ./Example 2 +RTS -N2 
        10.402s

Get it!

    Homepage: http://www.cse.unsw.edu.au/~dons/pqc.html
    Haddocks: http://www.cse.unsw.edu.au/~dons/pqc/
    Example : http://www.cse.unsw.edu.au/~dons/code/pqc/examples/Example.hs

    darcs get http://www.cse.unsw.edu.au/~dons/code/pqc