[PATCH] add $unixtime to http variables
Roberto De Ioris
roberto at unbit.it
Mon Sep 20 22:43:24 MSD 2010
>
> This is a patch to add $unixtime to the http variables.
>
> It simply contains the output of time(NULL)
>
> It could be useful to measure the time between the send
> of a request to an upstream module and the time the application
> server process it.
>
> Example:
>
> uwsgi_param UWSGI_TIME $unixtime;
>
> Then in your app:
>
> if int(time.time()) - int(env['UWSGI_TIME']):
> print "*** SYSTEM IS RESPONDING SLOWLY ***"
>
> I do not know if it is better to name it $time instead of $unixtime...
>
>
Sorry, i think for this purpose it is betetr to use
r->start_sec instead of time(NULL).
What do you think about it ?
--
Roberto De Ioris
http://unbit.it
More information about the nginx
mailing list