Get Query MetaData (ExecutionTime)

I want to get the execution time of a query within my code.
In ACF, this was possible with

In Lucee, I can do it with

(note the attribute “result” in the second query)

BUT… normally, I don’t use the “result”-Attribute in my queries. Workflow
is that I do a query in a model and then return the query itself (). In the caller code, it’s not possible to access to
“myQueryResult”. that would be stored in another struct. But… If I do a
cfdump within the caller code, the execution time IS displayed; so it has
to be somewhere…?

See

But unfortunately doesn’t work with LuceeVon: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag von Juerg Anderegg
Gesendet: Freitag, 9. September 2016 10:35
An: Lucee lucee@googlegroups.com
Betreff: [Lucee] get Query MetaData (ExecutionTime)

I want to get the execution time of a query within my code.
In ACF, this was possible with

In Lucee, I can do it with

(note the attribute “result” in the second query)

BUT… normally, I don’t use the “result”-Attribute in my queries. Workflow is that I do a query in a model and then return the query itself (). In the caller code, it’s not possible to access to “myQueryResult”. that would be stored in another struct. But… If I do a cfdump within the caller code, the execution time IS displayed; so it has to be somewhere…?

Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.commailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.commailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/b867299e-5326-4b15-86ed-d918aa67d907%40googlegroups.comhttps://groups.google.com/d/msgid/lucee/b867299e-5326-4b15-86ed-d918aa67d907%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

Try this:

On 9 September 2016 at 09:35, Juerg Anderegg <@Juerg_Anderegg> wrote:

I want to get the execution time of a query within my code.
In ACF, this was possible with

In Lucee, I can do it with

(note the attribute “result” in the second query)

BUT… normally, I don’t use the “result”-Attribute in my queries. Workflow is that I do a query in a model and then return the query itself (). In the caller code, it’s not possible to access to “myQueryResult”. that would be stored in another struct. But… If I do a cfdump within the caller code, the execution time IS displayed; so it has to be somewhere…?

Or even more simply:

The value will be in nanoseconds. Convert to millseconds with:

<cfset executionTime = ( qTest.executionTime()/1000000 ) />On 9 September 2016 at 13:46, Julian Halliwell <@Julian_Halliwell1> wrote: