test counter utils

This commit is contained in:
rowanc1
2014-05-18 00:15:00 -07:00
parent 709927a574
commit 2392b7d6b9
3 changed files with 56 additions and 19 deletions
-19
View File
@@ -93,22 +93,3 @@ def timeIt(f):
if type(counter) is Counter: counter.countToc(self.__class__.__name__+'.'+f.__name__)
return out
return wrapper
if __name__ == '__main__':
class MyClass(object):
def __init__(self, url):
self.counter = Counter()
@count
def MyMethod(self):
pass
@timeIt
def MySecondMethod(self):
pass
c = MyClass('blah')
for i in range(100): c.MyMethod()
for i in range(300): c.MySecondMethod()
c.counter.summary()