Home | History | Annotate | Download | only in scripts

Lines Matching refs:measurements

81     measurements from the power monitor (through the driver) and then
102 # variation of the ampere measurements
104 # ampere measurements at baseline state to vary around the mean by
118 # measurements that must be below the specified maximum amperes
123 # SAMPLE_COUNT_NOMINAL denotes the typical number of measurements of amperes
126 # RATE_NOMINAL denotes the nominal frequency at which ampere measurements
326 def computeBaselineState(self, measurements):
329 measurements: List of floats containing ampere draw measurements
331 Must be atleast 100 measurements long
340 # Looks at the measurements to see if it is in baseline state
341 if len(measurements) < 100:
343 "Need at least 100 measurements to determine if baseline state has"
352 sorted_measurements = sorted(measurements)
353 number_measurements = len(measurements)
360 # Assume that at baseline state, a large fraction of power measurements
362 # the average baseline current. Find all such measurements in the
384 measurements)):
398 float(right_index - left_index) / len(measurements)))
400 plt.plot(measurements)
412 mean current draw or mandate that the power measurements must have low
415 measurements must be below the specified value nominal_max_amps
417 measurements_amps: amperes draw measurements from power monitor
418 test_percentile: the fraction of measurements we require to be below
433 """This function first disables all sensors, then collects measurements
463 measurements = self.collectMeasurements(
466 if self.computeBaselineState(measurements)[0] is True:
473 measurements = self.collectMeasurements(
477 not measurements, "No background measurements could be taken")
478 retval = self.computeBaselineState(measurements)
481 if measurements and LOG_DATA_TO_FILE:
483 for m in measurements:
490 """This function repeatedly collects measurements until AP suspend and display off
502 # Maximum trials for which to collect measurements to get to Ap suspend
509 measurements = self.collectMeasurements(NUMBER_MEASUREMENTS,
513 measurements, PowerTest.MAX_PERCENTILE_AP_SCREEN_OFF_AMPS,
525 measurementCount: Number of measurements to collect from the power
527 rate: The integer frequency in Hertz at which to collect measurements from
530 A list containing measurements from the power monitor; that has the
531 requested count of the number of measurements at the specified rate
538 measurements = []
542 while len(measurements) < measurementCount and tries < 5:
554 measurements.append(sub_avg)
562 print ("MEASURED[%d]: %f" % (len(measurements), measurements[-1]))
566 self.reportErrorRaiseExceptionIf(measurementCount > len(measurements),
567 "Unable to collect all requested measurements")
568 return measurements
652 print ("Collecting sensor %s measurements" % sensor)
653 measurements = self.collectMeasurements(PowerTest.SAMPLE_COUNT_NOMINAL,
656 if measurements and LOG_DATA_TO_FILE:
659 for m in measurements:
667 not measurements, "No measurements could be taken for %s" % sensor)
668 avg = sum(measurements) / len(measurements)
669 squared = [(m - avg) * (m - avg) for m in measurements]
674 max_power = max(measurements) - avg
707 "buttons while measurements are taken.")
712 "while measurements are taken.")
760 "of power measurements that had the specified low "
761 "variance or the mean measurements were below the "