So I have this piece of code in Jena, that measures the execution time of a select query
Timer timer = new Timer();
timer.startTimer();
Query query = QueryFactory.create(queryString);
QueryExecution qexec = QueryExecutionFactory.create(query,dataset);
ResultSet results = qexec.execSelect();
long endTime = timer.endTimer();
Now the issue is the that this variable endTime
shows a running time result that is smaller than what the query execution time should have been. The dataset
is a Jena TDB location.
To test this out, I ran the same query using Apache Jena's Fuseki on the same TDB store and I find that the execution time is different (maybe the actual execution time). What is the right way to find execution time using Jena. I don't want to execute everything using Fuseki and find the answer.