Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
vote: Track valid_thing and valid_user rates in Graphite.
Browse files Browse the repository at this point in the history
This will get us a baseline for each of these so that when I refactor
this code I can feel more confident I haven't changed things.
  • Loading branch information
spladug committed Dec 1, 2014
1 parent 122160d commit f92936a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions r2/r2/models/vote.py
Expand Up @@ -244,6 +244,9 @@ def vote(cls, sub, obj, dir, ip, vote_info = None, cheater = False,

timer.intermediate("pg_write_vote")

g.stats.simple_event("vote.valid_thing." + str(v.valid_thing).lower())
g.stats.simple_event("vote.valid_user." + str(v.valid_user).lower())

up_change, down_change = score_changes(amount, oldamount)

if not (is_new and obj.author_id == sub._id and amount == 1):
Expand Down

0 comments on commit f92936a

Please sign in to comment.