There are two major types of tests for JunitPerf: the timed test and the load test, defined by the TimedTest class and LoadTest class, respectively.
When you create a TimedTest test decorator, you pass it an existing JUnit test and a maximum elapsed time in milliseconds . A TimedTest is a JUnit TestDecorator, which fails the decorated test after a specified time. You can use the TimedTest in two ways: Wait until the test completes and check the elapsed time, or fail immediately if the elapsed time exceeds the maximum.
A LoadTest is also a test decorator that runs a test with a number of simulated users for a certain amount of iterations. You can slowly ramp the load or turn it on all at once.