I was just thinking that it would be nice if the performance metrics that we can see currently:
... included query times. There are things we'd need to figure out, but would you find something like that useful? It would essentially be a way of drilling down into the X-TIME-IN-RESOURCE value more to separate querying from data-manipulation.
My initial thought is that Taffy could provide a wrapper for CFQuery. I've already been using
iQuery in my script-based resources (which is to say, most of them) for some time now without issue. It's a much clearer script query syntax and doesn't suffer any tangible performance problems. It would be simple to add it to Taffy's bonus folder, such that your queries would look like this:
local.result = new taffy.bonus.query(
"select * from users where userid = :id",
{ cachedWithin = createTimeSpan(0,0,10,0) }
);
If I did this, I could easily track DB metrics as well. The tricky part would be deciding how to report them (in aggregate? details? ...)
---
Now that I'm writing this down, what if instead Taffy gave you a method that you could call to track metrics of arbitrary functionality?
metricStart('userQuery');
//... query here
metricEnd('userQuery');
... which would result in that value being returned as a header and also being subtracted from the resource-time value.
Would that be more useful? The query thing would be automatic: Just use the Taffy query class and it tracks and reports metrics for your automatically, vs. arbitrary metrics that require a few additional lines of code wherever you want to track them.
---
Anyhow... just a thought. What say you?
Adam