def __init__(self): super(Media, self).__init__('RunMediaMetrics') self._media_metric = None # Used to add browser power and CPU metrics to results per test. self._add_browser_metrics = False self._cpu_metric = None self._memory_metric = None self._power_metric = power.PowerMetric()
def __init__(self, *args, **kwargs): super(PageCycler, self).__init__(*args, **kwargs) with open(os.path.join(os.path.dirname(__file__), 'page_cycler.js'), 'r') as f: self._page_cycler_js = f.read() self._speedindex_metric = speedindex.SpeedIndexMetric() self._memory_metric = None self._power_metric = power.PowerMetric() self._cpu_metric = None self._v8_object_stats_metric = None self._has_loaded_page = collections.defaultdict(int)
def ValidateAndMeasurePage(self, page, tab, results): if not tab.browser.platform.CanMonitorPower(): return util.WaitFor(tab.HasReachedQuiescence, 60) metric = power.PowerMetric(tab.browser.platform) metric.Start(page, tab) time.sleep(QuiescentPower.SAMPLE_TIME) metric.Stop(page, tab) metric.AddResults(tab, results)
def WillRunActions(self, page, tab): self._power_metric = power.PowerMetric() self._power_metric.Start(page, tab) self._smoothness_controller = smoothness_controller.SmoothnessController() self._smoothness_controller.Start(page, tab)
def __init__(self): super(_OctaneMeasurement, self).__init__() self._power_metric = power.PowerMetric()
def __init__(self): super(TabSwitching, self).__init__() self._first_page_in_pageset = True self._power_metric = power.PowerMetric()
def WillStartBrowser(self, platform): self._power_metric = power.PowerMetric(platform)
def WillStartBrowser(self, browser): self._power_metric = power.PowerMetric(browser)
def __init__(self): super(_SpaceportMeasurement, self).__init__() self._power_metric = power.PowerMetric()
def WillStartBrowser(self, browser): self._first_page_in_pageset = True self._power_metric = power.PowerMetric(browser, TabSwitching.SAMPLE_TIME)
def __init__(self): super(_SunspiderMeasurement, self).__init__() self._power_metric = power.PowerMetric()
def __init__(self): super(_RobohornetProMeasurement, self).__init__() self._power_metric = power.PowerMetric()
def __init__(self, *args, **kwargs): super(_IndexedDbMeasurement, self).__init__(*args, **kwargs) self._memory_metric = None self._power_metric = power.PowerMetric() self._v8_object_stats_metric = None
def __init__(self): super(_JsgamebenchMeasurement, self).__init__() self._power_metric = power.PowerMetric()
def WillStartBrowser(self, platform): self.first_page_in_storyset = True self._power_metric = power.PowerMetric(platform, TabSwitching.SAMPLE_TIME)
def __init__(self): super(WebRTC, self).__init__('RunWebrtc') self._cpu_metric = None self._memory_metric = None self._power_metric = power.PowerMetric()
def __init__(self): super(ImageDecoding, self).__init__() self._power_metric = power.PowerMetric()
def __init__(self): super(_DromaeoMeasurement, self).__init__() self._power_metric = power.PowerMetric()
def __init__(self): super(Memory, self).__init__('RunStressMemory') self._memory_metric = None self._power_metric = power.PowerMetric()
def WillStartBrowser(self, platform): self._power_metric = power.PowerMetric(platform) self._network_metric = network.NetworkMetric(platform)
def WillStartBrowser(self, platform): """Initialize metrics once right before the browser has been launched.""" self._power_metric = power.PowerMetric(platform)
def WillRunActions(self, page, tab): self._power_metric = power.PowerMetric() self._power_metric.Start(page, tab) self._smoothness_metric = smoothness.SmoothnessMetric() self._smoothness_metric.Start(page, tab)