p-unit 0.14

p-unit is a framework for benchmarking performance.

  Add it to your Download Basket!

 Add it to your Watch List!


Rate it!
send us
an update
The Apache License 2.0 
3.5/5 22
Andrew Zhang
ROOT \ System \ Benchmarks
p-unit is a framework for benchmarking performance. The project records memory consumption and execution time, and generates results in the form of plain text, image, and PDF file. Users can also easily register their own reporters by implementing PUnitEventList.

Test Suite and Test Class

Test suite and test class are two important concepts in p-unit. p-unit does not require any special type for a test class, so every class can be a test class. Of course, it includes junit test cases. There is one special interface for special p-unit only test class - p-unitTest. p-unit executes a normal test as following procedure:

invoke setUp if there is.
invoke the test method.
invoke tearDown method.

Noticed that setUp and tearDown will also be regarded as a part of performance test. If you don't want to count them into performance data, you need to implement p-unitTest interface, which will be executed as:

invoke setUpBeforeWatchers.
invoke setAfterWatchers.
invoke the test method.
invoke tearDownBeforeWatchers.
invoke tearDownAfterWatchers.

As the name suggests, you can put the setUp and tearDown code into the setUpBeforeWatchers and tearDownAfterWatchers.

Time/Memory Record

p-unit records the memory and time consumption of running a test method. There is a "watcher" concept in p-unit, which supervises the status during running the test method. By default, memory watcher and time watcher are installed. p-unit supports user-defined watcher too. The user only needs to implement the Watcher interface and register it to p-unit method runner.

What's New in This Release:

The p-unit core is based on J2SE5 now.
Some minor bugs were fixed.

Last updated on January 14th, 2008

#benchmarking performance #unit framework #PUnitEventList implementation #p-unit #benchmarking #performance #unit

Add your review!