From df6a93ddb61df5cf4cbfa11fe354d78404cd1567 Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Fri, 31 May 2013 14:09:51 -0400 Subject: [PATCH] Log time spent in markdown to statsd (imported from commit 736a4ddf0716cf365cfaafd8f22a88de00d126bd) --- zephyr/middleware.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zephyr/middleware.py b/zephyr/middleware.py index 3d7db60137..bcf44b2d00 100644 --- a/zephyr/middleware.py +++ b/zephyr/middleware.py @@ -100,6 +100,9 @@ class LogRequests(object): bugdown_output = " (md: %s/%s)" % (format_timedelta(bugdown_time_delta), bugdown_count_delta) + statsd.timing("%s.markdown.time" % (statsd_path,), timedelta_ms(bugdown_time_delta)) + statsd.incr("%s.markdown.count" % (statsd_path,), bugdown_count_delta) + # Get the amount of time spent doing database queries db_time_output = "" if len(connection.queries) > 0: