wolph / python-statsd

Python Client for the Etsy NodeJS Statsd Server
http://readthedocs.org/docs/python-statsd/en/latest/
BSD 3-Clause "New" or "Revised" License
110 stars 39 forks source link

timer decorator preserves inner function metadata #41

Closed raphaelmerx closed 8 years ago

raphaelmerx commented 8 years ago

Make use of functools.wraps to keep the decorated function name and docstring. Otherwise our views decorated with the timer show up as statsd.timer:_decorator

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 19060dfad2828b660374143cddd81ad9eadcb7f5 on raphaelmerx:master into c629b3e4cd7d8a6746a2055d6898600bd2737edd on WoLpH:master.

wolph commented 8 years ago

Very silly of me to forget this... thank you for the fix :)