Пример #1
0
 def framerateTest(self, testName, revision=None):
     # Threshold is in frames-per-second.  We need the value to be greater
     # than the threshold.
     el = self.getElement('#framerateResults')
     value = float(el.get_attribute('results'))  # in milliseconds
     threshold = float(os.environ.get('FRAMERATE_THRESHOLD', '10'))
     print 'Average framerate %4.2f fps (must be at least %4.2f fps)' % (
         value, threshold)
     if value < threshold or math.isnan(value):
         raise ThresholdException(value=value, threshold=threshold)
Пример #2
0
 def loadTimeTest(self, testName, revision=None):
     # Threshold is in milliseconds.  We need the value to be less than the
     # threshold.
     el = self.getElement('#loadResults')
     value = float(el.get_attribute('results'))
     threshold = float(os.environ.get('LOAD_SPEED_THRESHOLD', '1000'))
     print 'Average load time %1.0f ms (must be less than %1.0f ms)' % (
         value, threshold)
     if value > threshold or math.isnan(value):
         raise ThresholdException(value=value, threshold=threshold)