unbit/uwsgi — pull request #616 by prymitive (2014-05-03 10:14:20+00:00)
Title: don't recalculate avg_rt for static files

Related to i#80, consider this scenario:

* I'm running application with ``--offload-threads=2 --route-run=offload:``
* my app is single php/python/ruby view and a lot of static files (html/css/js)

Clients will make a lot more requests to static files then to application view, each static file request will be offloaded and it will update avg_rt metric with very low value (~0.2 millisecond).
avg_rt is averaged on every write (``avg_rt = (avg_rt + last_request_time)/2``) so we will end up with avg_rt reported in stats as value very close to 0

I think it makes sense to simply skip avg_rt recalculation for static files as it is meaningless.