Example #1
0
def count_rrd():
    """Add these counts to the rrd graph"""
    rrd = SystemCounts(
        ini.get('rrd_data').format(here=HERE),
        ini.get('rrd_graphs').format(here=HERE))
    rrd.mark(datetime.now(), BmarkMgr.count(), BmarkMgr.count(distinct=True),
             TagMgr.count())
    rrd.update()
Example #2
0
    def test_total_ct(self):
        """Verify that our total count method is working"""
        ct = 5
        for i in range(ct):
            t = Tag(gen_random_word(10))
            DBSession.add(t)

        ct = TagMgr.count()
        eq_(5, ct, 'We should have a total of 5: ' + str(ct))
Example #3
0
    def test_total_ct(self):
        """Verify that our total count method is working"""
        ct = 5
        for i in range(ct):
            t = Tag(gen_random_word(10))
            DBSession.add(t)

        ct = TagMgr.count()
        eq_(5, ct, 'We should have a total of 5: ' + str(ct))
Example #4
0
def count_rrd():
    """Add these counts to the rrd graph"""
    rrd = SystemCounts(
        ini.get('rrd_data').format(here=HERE),
        ini.get('rrd_graphs').format(here=HERE))
    rrd.mark(
        datetime.now(),
        BmarkMgr.count(),
        BmarkMgr.count(distinct=True),
        TagMgr.count()
    )
    rrd.update()
Example #5
0
 def count_total_tags():
     """Count the total number of tags in the system"""
     total = TagMgr.count()
     stat = StatBookmark(attrib=TAG_CT, data=total)
     DBSession.add(stat)