Fix perf node division by zero.
This commit is contained in:
parent
78440cce16
commit
4cb67c0d79
@ -56,9 +56,10 @@ class PerfGroup(Group):
|
|||||||
self._name = name
|
self._name = name
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
avg = round(self._total / self._count, 2)
|
if self._count:
|
||||||
print(self._name, "*", self._count,
|
avg = round(self._total / self._count, 2)
|
||||||
": min =", round(self._min, 2), ", max =", round(self._max, 2), ", avg =", avg, "(ms)")
|
print(self._name, "*", self._count,
|
||||||
|
": min =", round(self._min, 2), ", max =", round(self._max, 2), ", avg =", avg, "(ms)")
|
||||||
|
|
||||||
def draw(self, time):
|
def draw(self, time):
|
||||||
begin = thread_time()
|
begin = thread_time()
|
||||||
|
Loading…
Reference in New Issue
Block a user