I actually wrote the original profiler several years ago. The amount
of data you're fetching should not affect operation of the profiler. All
it does is to intercept evaluation of your query as it steps through the
expression tree and record the times at entry and exit of each expression.
This does, however add some overhead to the execution time of your
query. The amount of slow-down is dependent on the nature of your
query. If most of the time spent by your code is waiting for data, the
overhead of the profiler will be less because it's not involved when your
XQuery program is waiting for data to return. If your code is more CPU
intensive, then the effect of profiling will be more noticeable.
As I remember, execution time of profiled took roughly twice as long
as when not being profiled for a typical XQuery program.
All that being said, it's been several years since I worked on that code
so there might have been changes made that could have a greater impact
on your code and execution time. Optimizing your code is a good thing to
do in any case, so you're already winning.
---
Ron Hitchens {[email protected]} +44 7879 358212
On Sep 20, 2013, at 2:30 PM, [email protected] wrote:
> Hi Damon,
>
> Thanks for you quick reply,
>
> 1) Most of the times it never returns. It keeps on loading / executing.
> One time I got timed limit exceeded error.
>
> <image001.png>
>
> 2) When you say status on port 8001, are you referring to task server
> stats or App server status? In both cases I could not see anything in status
> page. Please let me know exactly which status should I look for.
>
> For you information, the function involves large data fetch. Is there any
> data limit for profiler?
> The elapsed time before code change, when I had profile generation issue is
> (PT20.306547S, PT20.082965S)
>
> FYI,
>
> After some performance improvement of the same function, now I was able to
> get the profile output.
> The elapsed time currently is (PT0.854151S, PT0.889512S)
>
>
>
> Thanks & Regards,
> Santhosh Rajasekaran,
> “Think twice before you start programming or you will program twice before
> you start thinking.”
> Vnet: 466749 ,Cell : +91 9600025142
> Location : Chennai, MEPZ
>
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Damon Feldman
> Sent: Friday, September 20, 2013 6:22 PM
> To: MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] Issue with Profilling - reg.,
>
> Santhosh,
>
> When you say hanged up, is it that the function never returns (and is visible
> in the server status tabs on port 8001) or it returns but no output is
> displayed, or that it times out?
>
> I can see a few possibilities – one is that there is a bug in the profiler
> possibly related to deep recursion, another is that the profiler causes your
> function to run slower so it is taking too long, and a third is some error on
> your part.
>
> Can you isolate this to a reproducible test case that inserts some documents
> and then the profile hangs up? You can post that here or submit as a bug to
> MarkLogic.
>
> Yours,
> Damon
>
> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> [email protected]
> Sent: Friday, September 20, 2013 5:17 AM
> To: [email protected]
> Subject: [MarkLogic Dev General] Issue with Profilling - reg.,
>
> Hi All,
>
> I was trying to do profiling for one of my function in my
> xquery module.
>
> Both profile button in CQ/Query Console , prof:report() function is not
> generating the profile report for that function. It is hanged up, I tried
> multiple times, and it didn’t work out.
>
> But profiling is working and generating report for other functions / adhoc
> query.
>
> Note: The function which I am trying to profile has multiple internal calls
> to other module functions and there are multiple recursive function calls.
>
> Please suggest what could be the reason?
>
> When I tried xdmp:query-meter(), xdmp:elapsed-time(), they are working and
> giving “PT20.319355S” timings.
>
> Thanks & Regards,
> Santhosh Rajasekaran,
> This e-mail and any files transmitted with it are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. If you are not the intended recipient(s), please reply to the
> sender and destroy all copies of the original message. Any unauthorized
> review, use, disclosure, dissemination, forwarding, printing or copying of
> this email, and/or any action taken in reliance on the contents of this
> e-mail is strictly prohibited and may be unlawful.
> This e-mail and any files transmitted with it are for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. If you are not the intended recipient(s), please reply to the
> sender and destroy all copies of the original message. Any unauthorized
> review, use, disclosure, dissemination, forwarding, printing or copying of
> this email, and/or any action taken in reliance on the contents of this
> e-mail is strictly prohibited and may be
> unlawful._______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general