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( )
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 ]
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)
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))
def DidStartBrowser(self, browser): self._memory_metric = memory.MemoryMetric(browser)
def DidStartBrowser(self, browser): self._cpu_metric = cpu.CpuMetric(browser) self._memory_metric = memory.MemoryMetric(browser) self._webrtc_stats_metric = webrtc_stats.WebRtcStatisticsMetric()
def DidStartBrowser(self, browser): """Initialize metrics once right after the browser has been launched.""" self._memory_metric = memory.MemoryMetric(browser)
def DidStartBrowser(self, browser): self._cpu_metric = cpu.CpuMetric(browser) self._memory_metric = memory.MemoryMetric(browser)