From bdad9c463542e4c93ee4ed58ace9594c406df9cc Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Thu, 15 Nov 2012 16:12:42 -0800 Subject: [PATCH] stats: Condense all vote_link_q shard stats into one stats key. --- r2/r2/lib/db/queries.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/r2/r2/lib/db/queries.py b/r2/r2/lib/db/queries.py index 127fab30f..df74dfc0e 100755 --- a/r2/r2/lib/db/queries.py +++ b/r2/r2/lib/db/queries.py @@ -1470,10 +1470,13 @@ def handle_vote(user, thing, dir, ip, organic, def process_votes(qname, limit=0): # limit is taken but ignored for backwards compatibility + stats_qname = qname + if stats_qname.startswith("vote_link"): + stats_qname = "vote_link_q" - @g.stats.amqp_processor(qname) + @g.stats.amqp_processor(stats_qname) def _handle_vote(msg): - timer = stats.get_timer("service_time." + qname) + timer = stats.get_timer("service_time." + stats_qname) timer.start() #assert(len(msgs) == 1)