Skip to content

Obtain query execution times

alangrafu edited this page Dec 7, 2012 · 4 revisions

LODSPeaKr provides a way to obtain the time taken to execute a query. The data is stored in the variable lodspk.queryTime in the same way as a SPARQL results. The object contains two fields, query that stores the name of the query and time that stores the time in seconds as a float.

ATTENTION: If you are caching query results, the time returned will be what it took to LODSPeaKr to obtain the data from the cache. See Enabling caching of results for more info.

##Using the query times You can list all the query times by running the following code in your template:

{%for row in lodspk.queryTimes%}
 {{row.query.value}} took {{row.time.value}}
{%endfor%}

You can even generate charts showing the performance of all the queries for that page

{{lodspk.queryTimes|GoogleVizColumnChart:"query,time"}}

query times in a chart

Clone this wiki locally