public class SQL2SearchTest extends SimpleSearchTest
Constructor and Description |
---|
SQL2SearchTest() |
Modifier and Type | Method and Description |
---|---|
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 |
afterTest() |
protected void |
beforeTest() |
protected javax.jcr.query.Query |
createQuery(javax.jcr.query.QueryManager manager,
int i) |
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 |
login(javax.jcr.Credentials credentials)
Returns a new session for the given user
that will be automatically closed once
all the iterations of this test have been executed.
|
protected javax.jcr.Session |
loginAnonymous()
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 void |
logout(javax.jcr.Session session)
Logs out and removes the session from the internal pool.
|
void |
run(Iterable<RepositoryFixture> fixtures)
Runs this benchmark against all the given repository fixtures.
|
void |
run(Iterable<RepositoryFixture> fixtures,
List<Integer> concurrencyLevels) |
void |
setPrintStream(PrintStream out) |
void |
setUp(javax.jcr.Repository repository,
javax.jcr.Credentials credentials)
Prepares this performance benchmark.
|
void |
tearDown()
Cleans up after this performance benchmark.
|
afterSuite, beforeSuite, runTest
protected javax.jcr.query.Query createQuery(javax.jcr.query.QueryManager manager, int i) throws javax.jcr.RepositoryException
createQuery
in class SimpleSearchTest
javax.jcr.RepositoryException
public void setPrintStream(PrintStream out)
setPrintStream
in interface CSVResultGenerator
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 accessException
- if the benchmark can not be preparedpublic void run(Iterable<RepositoryFixture> fixtures)
Benchmark
public void run(Iterable<RepositoryFixture> fixtures, List<Integer> concurrencyLevels)
public long execute() throws Exception
Exception
- if an error occurspublic void tearDown() throws Exception
Exception
- if the benchmark can not be cleaned upprotected void failOnRepositoryVersions(String... versions) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected javax.jcr.Repository getRepository()
protected javax.jcr.Credentials getCredentials()
protected javax.jcr.Session loginAnonymous()
protected javax.jcr.Session login(javax.jcr.Credentials credentials)
credentials
- the user credentialsprotected void logout(javax.jcr.Session session)
session
- the session to logoutprotected javax.jcr.Session loginWriter()
protected void addBackgroundJob(Runnable job)
job
- background jobCopyright © 2012-2015 The Apache Software Foundation. All Rights Reserved.