Hello Christian,

I have some small questions over the profile module.

1) The following code
declare function local:sequence($nb){for $i in 1 to xs:integer($nb) return
$i};
prof:time(fn:count(local:sequence(1000000000000000000)))
return 4.94 ms.

It means that you lazy evaluate the query "{for $i in 1 to xs:integer($nb)
return $i" ?
(I recall that you already mentioned this point that but I would like a
confirmation, since it might be a profiler issue)

2) It seems that you somehow call the fn:trace function in the profile
module. Is there a way to catch the returned values of these functions ?
The motivation is for profiling purposes. To be more specific, I would like
to treat the output results as

<output @function = "my_function">{prof:time( "xquery" ) }</output>

to be able to aggregate results at a higher level of call, i.e. something
like

for $output in $prof//output
let $fun := data($output/@function)
group by $fun
return element-name{$fun}{sum(data($output) ) }


Thanks

Jean-Marc
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

Reply via email to