Ejemplo n.º 1
0
 def DidStartBrowser(self, browser):
     """Initialize metrics once right after the browser has been launched."""
     self._memory_metric = memory.MemoryMetric(browser)
     self._cpu_metric = cpu.CpuMetric(browser)
     if self._record_v8_object_stats:
         self._v8_object_stats_metric = v8_object_stats.V8ObjectStatsMetric(
         )
Ejemplo n.º 2
0
 def DidStartBrowser(self, browser):
     """Initialize metrics once right after the browser has been launched."""
     self._memory_metric = memory.MemoryMetric(browser)
     self._memory_metric.Start()
     self._histograms = [
         histogram.HistogramMetric(h, histogram.RENDERER_HISTOGRAM)
         for h in MEMORY_HISTOGRAMS
     ]
Ejemplo n.º 3
0
    def DidNavigateToPage(self, page, tab):
        """Override to do operations right after the page is navigated."""
        self._media_metric = media.MediaMetric(tab)
        self._media_metric.Start(page, tab)
        # Reset to false for every page.
        self._add_browser_metrics = False
        if hasattr(page, 'add_browser_metrics'):
            self._add_browser_metrics = page.add_browser_metrics

        # Start browser metrics at page level to isolate startup CPU usage.
        if self._add_browser_metrics:
            self._cpu_metric = cpu.CpuMetric(tab.browser)
            self._cpu_metric.Start(page, tab)
            # No need to start memory metric since we are only interested in Summary
            # results.
            self._memory_metric = memory.MemoryMetric(tab.browser)
Ejemplo n.º 4
0
 def DidStartBrowser(self, browser):
   """Initialize metrics once right after the browser has been launched."""
   self._memory_metric = memory.MemoryMetric(browser)
   self._v8_object_stats_metric = (
     v8_object_stats.V8ObjectStatsMetric(_V8_COUNTER_NAMES))
Ejemplo n.º 5
0
 def DidStartBrowser(self, browser):
     self._memory_metric = memory.MemoryMetric(browser)
Ejemplo n.º 6
0
 def DidStartBrowser(self, browser):
   self._cpu_metric = cpu.CpuMetric(browser)
   self._memory_metric = memory.MemoryMetric(browser)
   self._webrtc_stats_metric = webrtc_stats.WebRtcStatisticsMetric()
Ejemplo n.º 7
0
 def DidStartBrowser(self, browser):
   """Initialize metrics once right after the browser has been launched."""
   self._memory_metric = memory.MemoryMetric(browser)
Ejemplo n.º 8
0
 def DidStartBrowser(self, browser):
     self._cpu_metric = cpu.CpuMetric(browser)
     self._memory_metric = memory.MemoryMetric(browser)