We are in the process of fine-tuning our application and I am in the process of finding out the time lag between a method call. The method can be a function call or a rest process .
let $x := fn:current-time()
let $re := xdmp:http-post('http://www.somerestdomain.com',())
let $y := fn:currrent-time()
return $x - $y
or
let $x := fn:current-time()
let $re := domain:call-some-long-running-function()
let $y := fn:currrent-time()
return $x - $y
profiling this shows me XQuery engine optimize the fn:current-time()
call and always assigns $x & $y as the same value.
I found this sample code which is also having some issues w.r.t to MarkLogic http://en.wikibooks.org/wiki/XQuery/Uptime_monitor
We are using MarkLogic Xml Database and Pseudo code mentioned above refers MarkLogic API
Is there any way to find out XQuery TimeOut ?