Ejemplo n.º 1
0
 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()
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
    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)
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 def __init__(self):
     super(_OctaneMeasurement, self).__init__()
     self._power_metric = power.PowerMetric()
Ejemplo n.º 6
0
 def __init__(self):
     super(TabSwitching, self).__init__()
     self._first_page_in_pageset = True
     self._power_metric = power.PowerMetric()
Ejemplo n.º 7
0
 def WillStartBrowser(self, platform):
     self._power_metric = power.PowerMetric(platform)
Ejemplo n.º 8
0
 def WillStartBrowser(self, browser):
     self._power_metric = power.PowerMetric(browser)
Ejemplo n.º 9
0
 def __init__(self):
     super(_SpaceportMeasurement, self).__init__()
     self._power_metric = power.PowerMetric()
Ejemplo n.º 10
0
 def WillStartBrowser(self, browser):
     self._first_page_in_pageset = True
     self._power_metric = power.PowerMetric(browser,
                                            TabSwitching.SAMPLE_TIME)
Ejemplo n.º 11
0
 def __init__(self):
   super(_SunspiderMeasurement, self).__init__()
   self._power_metric = power.PowerMetric()
Ejemplo n.º 12
0
 def __init__(self):
     super(_RobohornetProMeasurement, self).__init__()
     self._power_metric = power.PowerMetric()
Ejemplo n.º 13
0
 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
Ejemplo n.º 14
0
 def __init__(self):
     super(_JsgamebenchMeasurement, self).__init__()
     self._power_metric = power.PowerMetric()
Ejemplo n.º 15
0
 def WillStartBrowser(self, platform):
   self.first_page_in_storyset = True
   self._power_metric = power.PowerMetric(platform, TabSwitching.SAMPLE_TIME)
Ejemplo n.º 16
0
 def __init__(self):
     super(WebRTC, self).__init__('RunWebrtc')
     self._cpu_metric = None
     self._memory_metric = None
     self._power_metric = power.PowerMetric()
Ejemplo n.º 17
0
 def __init__(self):
     super(ImageDecoding, self).__init__()
     self._power_metric = power.PowerMetric()
Ejemplo n.º 18
0
 def __init__(self):
     super(_DromaeoMeasurement, self).__init__()
     self._power_metric = power.PowerMetric()
Ejemplo n.º 19
0
 def __init__(self):
     super(Memory, self).__init__('RunStressMemory')
     self._memory_metric = None
     self._power_metric = power.PowerMetric()
Ejemplo n.º 20
0
 def WillStartBrowser(self, platform):
     self._power_metric = power.PowerMetric(platform)
     self._network_metric = network.NetworkMetric(platform)
Ejemplo n.º 21
0
 def WillStartBrowser(self, platform):
   """Initialize metrics once right before the browser has been launched."""
   self._power_metric = power.PowerMetric(platform)
Ejemplo n.º 22
0
 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)