|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.jackrabbit.oak.performance.AbstractTest
public abstract class AbstractTest
Abstract base class for individual performance benchmarks.
| Constructor Summary | |
|---|---|
AbstractTest()
|
|
| Method Summary | |
|---|---|
protected void |
addBackgroundJob(Runnable job)
Adds a background thread that repeatedly executes the given job until all the iterations of this test have been executed. |
protected void |
afterSuite()
Run after all iterations of this test have been executed. |
protected void |
afterTest()
|
protected void |
beforeSuite()
Run before any iterations of this test get executed. |
protected void |
beforeTest()
|
long |
execute()
Executes a single iteration of this test. |
protected void |
failOnRepositoryVersions(String... versions)
|
protected javax.jcr.Credentials |
getCredentials()
|
protected javax.jcr.Repository |
getRepository()
|
protected static int |
getScale(int def)
|
protected javax.jcr.Session |
loginReader()
Returns a new reader session that will be automatically closed once all the iterations of this test have been executed. |
protected javax.jcr.Session |
loginWriter()
Returns a new writer session that will be automatically closed once all the iterations of this test have been executed. |
protected abstract void |
runTest()
|
void |
setUp(javax.jcr.Repository repository,
javax.jcr.Credentials credentials)
Prepares this performance benchmark. |
void |
tearDown()
Cleans up after this performance benchmark. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractTest()
| Method Detail |
|---|
protected static int getScale(int def)
public void setUp(javax.jcr.Repository repository,
javax.jcr.Credentials credentials)
throws Exception
repository - the repository to usecredentials - credentials of a user with write access
Exception - if the benchmark can not be prepared
public long execute()
throws Exception
Exception - if an error occurs
public void tearDown()
throws Exception
Exception - if the benchmark can not be cleaned up
protected void beforeSuite()
throws Exception
Exception - if an error occurs
protected void beforeTest()
throws Exception
Exception
protected abstract void runTest()
throws Exception
Exception
protected void afterTest()
throws Exception
Exception
protected void afterSuite()
throws Exception
Exception - if an error occurs
protected void failOnRepositoryVersions(String... versions)
throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionprotected javax.jcr.Repository getRepository()
protected javax.jcr.Credentials getCredentials()
protected javax.jcr.Session loginReader()
protected javax.jcr.Session loginWriter()
protected void addBackgroundJob(Runnable job)
job - background jobpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||