prevent false positives caused by zero-duration profiles
This commit is contained in:
parent
54c51cba47
commit
158e726dc7
|
|
@ -46,8 +46,13 @@ class TaskTracker:
|
|||
self.notify.info(s)
|
||||
return isSpike
|
||||
def addProfileSession(self, session):
|
||||
isSpike = self._checkSpike(session)
|
||||
duration = session.getDuration()
|
||||
if duration == 0.:
|
||||
# profiled code was too fast for the clock, throw this result out
|
||||
# if we keep it we may get many false positive spike detects
|
||||
return
|
||||
|
||||
isSpike = self._checkSpike(session)
|
||||
self._durationAverager.addValue(duration)
|
||||
|
||||
storeAvg = True
|
||||
|
|
|
|||
Loading…
Reference in New Issue