Skip to content
Snippets Groups Projects
Commit 25432945 authored by Daniel's avatar Daniel
Browse files

DEBUG: Added more benchmarking.

parent 8cf03773
No related branches found
No related tags found
No related merge requests found
......@@ -415,6 +415,7 @@ public class Query implements QueryInterface, ToElementable, TransactionInterfac
}
public void parse() throws ParsingException {
final long t1 = System.currentTimeMillis();
CQLLexer lexer;
lexer = new CQLLexer(CharStreams.fromString(this.query));
final CommonTokenStream tokens = new CommonTokenStream(lexer);
......@@ -434,6 +435,8 @@ public class Query implements QueryInterface, ToElementable, TransactionInterfac
this.type = cq.t;
this.filter = cq.filter;
this.selections = cq.s;
final long t2 = System.currentTimeMillis();
addBenchmark("parse (" + this.query + ")", t2 - t1);
}
private String executeStrategy() throws QueryException {
......
......@@ -99,6 +99,7 @@ public class EntityResource extends AbstractCaosDBServerResource {
throws ConnectionException, IOException, SQLException, CaosDBException,
NoSuchAlgorithmException, Exception {
final long t1 = System.currentTimeMillis();
if (!this.get) {
getResponse().setStatus(Status.CLIENT_ERROR_METHOD_NOT_ALLOWED);
return null;
......@@ -112,6 +113,10 @@ public class EntityResource extends AbstractCaosDBServerResource {
final Retrieve retrieve = new Retrieve(entityContainer);
retrieve.execute();
final long t2 = System.currentTimeMillis();
entityContainer
.getTransactionBenchmark()
.addBenchmark(getClass().getSimpleName() + ".httpGetInChildClass", t2 - t1);
final Element rootElem = generateRootElement();
entityContainer.addToElement(rootElem);
doc.setRootElement(rootElem);
......
......@@ -613,9 +613,7 @@ public class TestServerSideScriptingCaller extends CaosDBTestClass {
caller.cleanup();
}
/**
* Does the order of directory creation matter?
*/
/** Does the order of directory creation matter? */
@Test
public void testDirectoriesInWrongOrder() throws Message {
final String[] cmd = {testExecutable.getAbsolutePath()};
......@@ -645,9 +643,7 @@ public class TestServerSideScriptingCaller extends CaosDBTestClass {
caller.cleanup();
}
/**
* Is the new home directory created correctly?
*/
/** Is the new home directory created correctly? */
@Test
public void testWorkingDirCreation() throws Exception {
final String[] cmd = {testExecutable.getAbsolutePath()};
......@@ -660,9 +656,7 @@ public class TestServerSideScriptingCaller extends CaosDBTestClass {
caller.cleanup();
}
/**
* Does copying files over to the new home directory work?
*/
/** Does copying files over to the new home directory work? */
@Test
public void testWorkingDirCopying() throws Exception {
final String[] cmd = {testExecutable.getAbsolutePath()};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment