bugfix
This commit is contained in:
parent
9d0dc1cccc
commit
cbe9ef259e
@ -20,12 +20,6 @@ class TimeCost:
|
|||||||
def clear(self):
|
def clear(self):
|
||||||
timerecord = {}
|
timerecord = {}
|
||||||
|
|
||||||
def getTimeCost(self,name):
|
|
||||||
x = timerecord.get(name,[])
|
|
||||||
if len(x) == 0:
|
|
||||||
return 0,0,0
|
|
||||||
return len(x), sum(x), sum(x)/len(x)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def clear_all(self):
|
def clear_all(self):
|
||||||
timerecord = {}
|
timerecord = {}
|
||||||
@ -36,7 +30,13 @@ class TimeCost:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def show(self):
|
def show(self):
|
||||||
|
def getTimeCost(name):
|
||||||
|
x = timerecord.get(name,[])
|
||||||
|
if len(x) == 0:
|
||||||
|
return 0,0,0
|
||||||
|
return len(x), sum(x), sum(x)/len(x)
|
||||||
|
|
||||||
print('TimeCost ....')
|
print('TimeCost ....')
|
||||||
for name in timerecord.keys():
|
for name in timerecord.keys():
|
||||||
print(name, * self.getTimeCost(name))
|
print(name, * getTimeCost(name))
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
__version__ = '5.1.22'
|
__version__ = '5.1.23'
|
||||||
|
Loading…
Reference in New Issue
Block a user