|
hi, i want to know the method which can help me to find out query execution time in sesame rdf framework.while i query with serql and sparql both.please help me.i need answer very urgently |
|
Sesame's API does not expose this information directly to you AFAIK With Java you can do the following to time operations:
You can then convert the duration in nanoseconds into seconds like so:
+1. Alternatively, you can look in the Sesame server logs to see how long any operation took to execute. hi, where should apply this java code in sesame long start = System.nanoTime(); //Perform your operation long duration = System.nanoTime() - start; please tell me. @amita, Rob's solution is simply to get the system time ( 1
Definitely a better answer than mine for this comparable question: http://answers.semanticweb.com/questions/15603/query-response-time-for-sparql. But seeing the confusion of the OP, I'd stick with the stopwatch ;-) this method of find the time in sesame doesn't help me because whenever i give the query to it server logs doesn't give me query execution time and System.nanoTime() also not working please tell me another way
showing 5 of 6
show 1 more comments
|
|
You can use sesame console for this purpose:
http://localhost:8080/openrdf-sesame should be replaced with the your sesame instance url. After execution of these commands the console will show the result of the query and execution time (including the time for network interaction) in milliseconds. The same is true for serql. |
|
This a java utility that would help you out. Have tried it in one of my personal pet projects. StopWatch swatch=new LoggingStopWatch(); //Write all your querying logic in here]n QueryExecution qexec=QueryExecutionFactory.sparqlService("http://dbpedia.org/sparql", query); ResultSet rs=qexec.execSelect(); //this will print the time along with the passed message swatch.stop("Results Obtained"); The reult would be something like this start[1361269503870] time[1426] tag[Results Obtained] Hope it helps :) |


hi amita, and welcome to answers.semanticweb.com. To get the best use of out this site, please read the helpful tips at http://answers.semanticweb.com/questions/14494/welcome-to-answerssemanticwebcom