Exemplo n.º 1
0
 def CreateCoreTimelineBasedMeasurementOptions(self):
     category_filter = chrome_trace_category_filter.CreateLowOverheadFilter(
     )
     options = timeline_based_measurement.Options(category_filter)
     options.config.chrome_trace_config.EnableUMAHistograms(
         'Event.Latency.ScrollBegin.Touch.TimeToScrollUpdateSwapBegin4',
         'Event.Latency.ScrollUpdate.Touch.TimeToScrollUpdateSwapBegin4',
         'Event.Latency.ScrollBegin.Wheel.TimeToScrollUpdateSwapBegin4',
         'Event.Latency.ScrollUpdate.Wheel.TimeToScrollUpdateSwapBegin4',
         'Graphics.Smoothness.Checkerboarding.CompositorAnimation',
         'Graphics.Smoothness.Checkerboarding.MainThreadAnimation',
         'Graphics.Smoothness.Checkerboarding.PinchZoom',
         'Graphics.Smoothness.Checkerboarding.RAF',
         'Graphics.Smoothness.Checkerboarding.TouchScroll',
         'Graphics.Smoothness.Checkerboarding.Video',
         'Graphics.Smoothness.Checkerboarding.WheelScroll',
         'Graphics.Smoothness.Throughput.MainThread.MainThreadAnimation',
         'Graphics.Smoothness.Throughput.MainThread.PinchZoom',
         'Graphics.Smoothness.Throughput.MainThread.RAF',
         'Graphics.Smoothness.Throughput.MainThread.TouchScroll',
         'Graphics.Smoothness.Throughput.MainThread.WheelScroll',
         'Graphics.Smoothness.Throughput.CompositorThread.CompositorAnimation',
         'Graphics.Smoothness.Throughput.CompositorThread.PinchZoom',
         'Graphics.Smoothness.Throughput.CompositorThread.TouchScroll',
         'Graphics.Smoothness.Throughput.CompositorThread.WheelScroll')
     options.SetTimelineBasedMetrics(['renderingMetric', 'umaMetric'])
     return options
Exemplo n.º 2
0
 def CreateCoreTimelineBasedMeasurementOptions(self):
   category_filter = chrome_trace_category_filter.CreateLowOverheadFilter()
   options = timeline_based_measurement.Options(category_filter)
   options.config.chrome_trace_config.EnableUMAHistograms(
       *RENDERING_BENCHMARK_UMA)
   options.SetTimelineBasedMetrics(['renderingMetric', 'umaMetric'])
   return options
Exemplo n.º 3
0
 def CreateCoreTimelineBasedMeasurementOptions(self):
   category_filter = chrome_trace_category_filter.CreateLowOverheadFilter()
   options = timeline_based_measurement.Options(category_filter)
   options.config.chrome_trace_config.EnableUMAHistograms(
       'Event.Latency.ScrollBegin.Touch.TimeToScrollUpdateSwapBegin4',
       'Event.Latency.ScrollUpdate.Touch.TimeToScrollUpdateSwapBegin4')
   options.SetTimelineBasedMetrics(['renderingMetric', 'umaMetric'])
   return options
Exemplo n.º 4
0
 def CreateCoreTimelineBasedMeasurementOptions(self):
   category_filter = chrome_trace_category_filter.CreateLowOverheadFilter()
   # Supplement the base trace categories with "gpu.memory" which records
   # timings associated with memory ablation experiments.
   category_filter.AddFilterString('gpu.memory')
   options = timeline_based_measurement.Options(category_filter)
   options.config.chrome_trace_config.EnableUMAHistograms(
       *RENDERING_BENCHMARK_UMA)
   options.SetTimelineBasedMetrics(['renderingMetric', 'umaMetric', 'memoryAblationMetric'])
   return options
Exemplo n.º 5
0
 def WillNavigateToPage(self, page, tab):
     self._timeline_controller = timeline_controller.TimelineController(
         enable_auto_issuing_record=False)
     if self._report_silk_details:
         # We need the other traces in order to have any details to report.
         self._timeline_controller.trace_categories = None
     else:
         self._timeline_controller.trace_categories = \
             chrome_trace_category_filter.CreateLowOverheadFilter().filter_string
     self._timeline_controller.SetUp(page, tab)
Exemplo n.º 6
0
 def WillNavigateToPage(self, page, tab):
   self._timeline_controller = timeline_controller.TimelineController(
       enable_auto_issuing_record=False)
   if self._report_silk_details:
     # We need the other traces in order to have any details to report.
     self._timeline_controller.trace_categories = None
     if self.options and self.options.extra_chrome_categories:
       assert False, ('--extra_chrome_categories cannot be combined with'
                      '--report-silk-details')
   else:
     category_filter = chrome_trace_category_filter.CreateLowOverheadFilter()
     if self.options and self.options.extra_chrome_categories:
       category_filter.AddFilterString(self.options.extra_chrome_categories)
     self._timeline_controller.trace_categories = category_filter.filter_string
   self._timeline_controller.SetUp(page, tab)
Exemplo n.º 7
0
 def CreateCoreTimelineBasedMeasurementOptions(self):
     category_filter = chrome_trace_category_filter.CreateLowOverheadFilter(
     )
     category_filter.AddDisabledByDefault(
         'disabled-by-default-histogram_samples')
     options = timeline_based_measurement.Options(category_filter)
     options.config.chrome_trace_config.EnableUMAHistograms(
         *RENDERING_BENCHMARK_UMA)
     options.SetTimelineBasedMetrics([
         'renderingMetric',
         'umaMetric',
         # Unless --experimentatil-tbmv3-metric flag is used, the following tbmv3
         # metrics do nothing.
         'tbmv3:uma_metrics'
     ])
     return options
Exemplo n.º 8
0
 def CreateCoreTimelineBasedMeasurementOptions(self):
   category_filter = chrome_trace_category_filter.CreateLowOverheadFilter()
   # Supplement the base trace categories with "gpu.memory" which records
   # timings associated with memory ablation experiments.
   category_filter.AddFilterString('gpu.memory')
   category_filter.AddDisabledByDefault(
       'disabled-by-default-histogram_samples')
   options = timeline_based_measurement.Options(category_filter)
   options.config.chrome_trace_config.EnableUMAHistograms(
       *RENDERING_BENCHMARK_UMA)
   options.SetTimelineBasedMetrics([
       'renderingMetric',
       'umaMetric',
       'memoryAblationMetric',
       # Unless --experimentatil-tbmv3-metric flag is used, the following tbmv3
       # metrics do nothing.
       'tbmv3:uma_metrics'
   ])
   return options
Exemplo n.º 9
0
    def CreateCoreTimelineBasedMeasurementOptions(self):
        category_filter = chrome_trace_category_filter.CreateLowOverheadFilter(
        )
        tbm_options = timeline_based_measurement.Options(category_filter)
        uma_histograms = [
            'Ads.ResourceUsage.Size.Network.Mainframe.AdResource',
            'Ads.ResourceUsage.Size.Network.Mainframe.VanillaResource',
            'Ads.ResourceUsage.Size.Network.Subframe.AdResource',
            'Ads.ResourceUsage.Size.Network.Subframe.VanillaResource',
            'PageLoad.Clients.Ads.Cpu.AdFrames.Aggregate.TotalUsage',
            'PageLoad.Clients.Ads.Cpu.FullPage.TotalUsage',
            'PageLoad.Clients.Ads.Resources.Bytes.Ads2',
            'PageLoad.Experimental.Bytes.NetworkIncludingHeaders',
        ]
        for histogram in uma_histograms:
            tbm_options.config.chrome_trace_config.EnableUMAHistograms(
                histogram)

        tbm_options.SetTimelineBasedMetrics(['umaMetric', 'cpuTimeMetric'])
        return tbm_options
Exemplo n.º 10
0
    def CreateCoreTimelineBasedMeasurementOptions(self):
        category_filter = chrome_trace_category_filter.CreateLowOverheadFilter(
        )
        if self.enable_memory_metric:
            tbm_options = memory.CreateCoreTimelineBasedMemoryMeasurementOptions(
            )

            # The memory options only include the filters needed for memory
            # measurement. We reintroduce the filters required for other metrics.
            tbm_options.ExtendTraceCategoryFilter(
                category_filter.filter_string.split(','))
        else:
            tbm_options = timeline_based_measurement.Options(category_filter)

        uma_histograms = [
            'Ads.ResourceUsage.Size.Network.Mainframe.AdResource',
            'Ads.ResourceUsage.Size.Network.Mainframe.VanillaResource',
            'Ads.ResourceUsage.Size.Network.Subframe.AdResource',
            'Ads.ResourceUsage.Size.Network.Subframe.VanillaResource',
            'PageLoad.Clients.Ads.AllPages.NonAdNetworkBytes',
            'PageLoad.Clients.Ads.AllPages.PercentNetworkBytesAds',
            'PageLoad.Clients.Ads.Cpu.AdFrames.Aggregate.TotalUsage',
            'PageLoad.Clients.Ads.Cpu.FullPage.TotalUsage',
            'PageLoad.Clients.Ads.FrameCounts.AdFrames.Total',
            'PageLoad.Clients.Ads.Resources.Bytes.Ads2',
            'PageLoad.Cpu.TotalUsage',
            'PageLoad.Experimental.Bytes.NetworkIncludingHeaders',
            'PageLoad.PaintTiming.NavigationToFirstContentfulPaint',
        ]
        uma_histograms.extend(self.additional_histograms)
        for histogram in uma_histograms:
            tbm_options.config.chrome_trace_config.EnableUMAHistograms(
                histogram)

        tbm_options.AddTimelineBasedMetric('umaMetric')
        if self.enable_limited_cpu_time_metric:
            tbm_options.AddTimelineBasedMetric('limitedCpuTimeMetric')

        return tbm_options
Exemplo n.º 11
0
 def CreateCoreTimelineBasedMeasurementOptions(self):
     category_filter = chrome_trace_category_filter.CreateLowOverheadFilter(
     )
     options = timeline_based_measurement.Options(category_filter)
     options.SetTimelineBasedMetrics(['renderingMetric'])
     return options
Exemplo n.º 12
0
 def SetLowOverheadFilter(self):
     self._category_filter = (
         chrome_trace_category_filter.CreateLowOverheadFilter())