how can there be a count of 5, with an average the same as the total time?
Pretty sure this relates to the underlying problem with (duplicate stacktraces in modern debugging output)
a lot of the code doesn't make any sense and it's also super slow
pages.src is never a comma delimited list, it's the relative path to the file
page.stckTrace might as well be an ordered struct, as it's only deduped as an array later on
once again, pages.src is just a relative file path, it never contains a "$". maybe it's meant to be pages.path which sometimes contains fullpath$methodname (but often not)
this would all be redundant if you use an ordered struct to start with, instead of going from an array to a list and then finally back to an array
the actual method doesn't ever get shown, even tho it's already there in the source pages query, because page.stckTrace is extracted from pages.src which never contains a $ from what i can see, and then sometimes populated with a listlast $, so <cfif listLen(i, "$") gt 1> is always going to be false
this is also very missing leading
it’s going to grab any other debug rows relating to this same file and adding them to the totals for the current row, which it then will count all over again when it hits the next file.
and it’s adding all the other references into the stack trace from other calls to the same file
and this group means that if you have multiple calls in a row, to methods in the same file only the first one is shown and then anyway, all the other calls get combined due to the QoQ.
so it all ends up being extremely misleading and confusing.
It would be a lot cleaner to split out the pre processing out from the display logic, i.e. prepare the resultset and then just display it, that would also solve LDEV-2360 i think, as it’s working on the underlying result set before it’s processed causing the confusion it think?
so, thinking about this, it’s now rather obvious that the resultQry QoQ which caused LDEV-2238 in the first place, which was added in this commit
Part of this was coz the debug template modifies the debug log, so each time you view a log, the numbers go up.
I have submitted a patch with addresses that with a duplicate ()
But there are still problems outstanding