Hi Reece,
The responses of RESTXQ requests are now decorated with an additional Server-Timing headers [1].
You may experience that the timing for serialize is zero, or close to zero. The reason is that (as described) the actual result will only be generated while the result is being transmitted to the client. The %rest:single annotation, which allows developers to cancel running server requests, can currently be used to enforce the caching of a result. Otherwise, the time could be achieved by subtracting the returned times from the total request time.
A new snapshot is online [2], I’m looking forward to your feedback. Would you expect other HTTP services (such as our standard REST API) to also return timing results?
Cheers, Christian
[1] https://github.com/BaseXdb/basex/issues/2008 [2] https://files.basex.org/releases/latest/
On Thu, Apr 29, 2021 at 9:50 PM Reece Dunn msclrhd@googlemail.com wrote:
Hi all,
In BaseX, is there a way to get the profile timings (compile, run, print, etc.) in the response of a HTTP request via the Server-Timing header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)?
Kind regards, Reece