Mailing List Archive

Measure backend fetch time
Hello,

I was looking for a way to measure "how much backend time is saved" by
a cached object during its lifetime, in VCL. Simple approach:

In vcl_hit or vcl_deliver, look at

saved_time = obj.hits * fetch_time

Is there a way to get the time used for fetching from the backend?

Thanks and regards,
Torsten


_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: Measure backend fetch time [ In reply to ]
On 03/02/2020 15:58, Torsten Luettgert wrote:
> Is there a way to get the time used for fetching from the backend?

you can not access the fetch time from vcl because there is no vcl subroutine
called after the body has been fetched.

But you can get the data from varnishlog, you might want to look at the Resp
Timestamp: http://varnish-cache.org/docs/trunk/reference/vsl.html#timestamps

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc