The pqc package

[Tags: bsd3, library]

Parallel batch driver for QuickCheck


[Skip to ReadMe]

Properties

Versions0.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
Change logNone available
Dependenciesbase, QuickCheck (<2), random [details]
LicenseBSD3
AuthorDon Stewart
Maintainerdons@cse.unsw.edu.au
CategoryTesting
Home pagehttp://code.haskell.org/~dons/code/pqc
UploadedTue Nov 6 01:00:54 UTC 2007 by DonaldStewart
DistributionsNixOS:0.8
Downloads2088 total (104 in last 30 days)
Votes
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Flags

NameDescriptionDefault
split-baseEnabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for pqc-0.2

------------------------------------------------------------------------
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