예제 #1
0
파일: stats.py 프로젝트: EliotBerriot/1flow
def synchronize_statsd_tags_gauges(full=False):

    with benchmark('synchronize statsd gauges for Tag.*'):

        statsd.gauge('tags.counts.total', Tag._get_collection().count())

        if full:
            duplicates = Tag.objects(duplicate_of__ne=None).no_cache()
            statsd.gauge('tags.counts.duplicates', duplicates.count())