bramble icon indicating copy to clipboard operation
bramble copied to clipboard

Cannot access timings

Open anar-khalilov opened this issue 2 years ago • 3 comments

We want to access timings as shown below but we couldn't find a way. Can you provide a way to be able to measure performance by making these timings accessible somehow?

image

anar-khalilov avatar Jan 25 '23 14:01 anar-khalilov

Hey there, if you supply a header in your request with the key ,values being X-Bramble-Debug: timing it will return you the timing values in the extensions field of the response.

You can see what other values you can request with that header here

LeonHuston avatar Jan 27 '23 05:01 LeonHuston

Yes, we set this header to "all".

Can you provide a concrete example on how to access these values not from the package but from outside as a consumer of this package? We tried many different methods to no avail.

If there is no such way, could you provide one?

anar-khalilov avatar Jan 27 '23 09:01 anar-khalilov

Hi @anar-khalilov, I'm not sure what you mean by outside the package?

The timings are in the JSON body of the HTTP response.

{
    "data": "…",
    "extensions": {
        "plan": "…",
        "timings": {
            "execution": "194ms",
            "format": "0s",
            "merge": "0s"
        }
    }
}

So if your HTTP client lets you inspect the response at a higher level than the data key then they are there. It doesn't currently break the timings down by service or field though.

pkqk avatar Jan 30 '23 22:01 pkqk