diff options
author | Thomas Stephens <thomas@ustudio.com> | 2013-04-26 16:41:17 -0500 |
---|---|---|
committer | Thomas Stephens <thomas@ustudio.com> | 2013-04-26 16:41:17 -0500 |
commit | adc7933fd77d595fb9170fb65144e0fb1754ae02 (patch) | |
tree | 597560d3cc46b4fe635b9a344072640f174ae93c | |
parent | b8c3dc423a62aba80742cb9025455e49851842e3 (diff) | |
download | pystatsd-adc7933fd77d595fb9170fb65144e0fb1754ae02.tar.gz |
Adding documentation for the set type
-rw-r--r-- | docs/types.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/types.rst b/docs/types.rst index 66c742c..bcb97fe 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -142,6 +142,19 @@ keyword argument to ``True``. For example:: will need to be running at least that version for the ``delta`` kwarg to have any effect. +Sets +====== + +*Sets* count the number of unique values passed to a key. + +For example, you could count the number of users accessing your system +using: + + statsd.set('users', userid) + +If that method is called multiple times with the same userid, that +userid will only be counted once, for the sample period. + .. _statsd: https://github.com/etsy/statsd .. _Graphite: http://graphite.wikidot.com/ |