def eventReceived(self, event):
     self._times.append(event['duration'])
     if len(self._times) == 200:
         print('mean:', mean(self._times))
         print('median:', median(self._times))
         print('stddev:', stddev(self._times))
         print('mad:', mad(self._times))
         del self._times[:100]
Esempio n. 2
0
 def eventReceived(self, event):
     self._times.append(event['duration'])
     if len(self._times) == 200:
         print('mean:', mean(self._times))
         print('median:', median(self._times))
         print('stddev:', stddev(self._times))
         print('mad:', mad(self._times))
         del self._times[:100]