Beispiel #1
0
def _GetAllTimelineBasedMetrics():
    # TODO(nednguyen): use discovery pattern to return all the instances of
    # all TimelineBasedMetrics class in web_perf/metrics/ folder.
    # This cannot be done until crbug.com/460208 is fixed.
    return (smoothness.SmoothnessMetric(),
            responsiveness_metric.ResponsivenessMetric(),
            layout.LayoutMetric(), gpu_timeline.GPUTimelineMetric())
Beispiel #2
0
def _GetAllLegacyTimelineBasedMetrics():
    # TODO(nednguyen): use discovery pattern to return all the instances of
    # all TimelineBasedMetrics class in web_perf/metrics/ folder.
    # This cannot be done until crbug.com/460208 is fixed.
    return (smoothness.SmoothnessMetric(), layout.LayoutMetric(),
            blob_timeline.BlobTimelineMetric(),
            indexeddb_timeline.IndexedDBTimelineMetric(),
            webrtc_rendering_timeline.WebRtcRenderingTimelineMetric())
def _GetAllTimelineBasedMetrics():
    # TODO(nednguyen): use discovery pattern to return all the instances of
    # all TimelineBasedMetrics class in web_perf/metrics/ folder.
    # This cannot be done until crbug.com/460208 is fixed.
    return (smoothness.SmoothnessMetric(),
            responsiveness_metric.ResponsivenessMetric(),
            layout.LayoutMetric(), gpu_timeline.GPUTimelineMetric(),
            blob_timeline.BlobTimelineMetric(),
            memory_timeline.MemoryTimelineMetric(),
            text_selection.TextSelectionMetric(),
            indexeddb_timeline.IndexedDBTimelineMetric(),
            webrtc_rendering_timeline.WebRtcRenderingTimelineMetric())
Beispiel #4
0
 def ValidateAndMeasurePage(self, page, tab, results):
   self._timeline_controller.Stop(tab, results)
   metric = timeline.ThreadTimesTimelineMetric()
   renderer_thread = \
       self._timeline_controller.model.GetRendererThreadFromTabId(tab.id)
   if self._report_silk_details:
     metric.details_to_report = timeline.ReportSilkDetails
   metric.AddResults(self._timeline_controller.model, renderer_thread,
                     self._timeline_controller.smooth_records, results)
   layout_metric = layout.LayoutMetric()
   layout_metric.AddResults(self._timeline_controller.model, renderer_thread,
                            self._timeline_controller.smooth_records, results)
Beispiel #5
0
 def testAvgStddev(self):
   results = page_test_results.PageTestResults()
   results.WillRunPage(page.Page('file://blank.html'))
   events = map(FakeEvent._make, [(name, 42, 43) for name in
                                  layout.LayoutMetric.EVENTS])
   layout.LayoutMetric()._AddResults(events, results)
   expected = set()
   for name in layout.LayoutMetric.EVENTS.itervalues():
     expected.add((name + '_avg', 1))
     expected.add((name + '_stddev', 0))
   actual = set((value.name, value.value) for value in
                results.current_page_run.values)
   self.assertEquals(expected, actual)
def GetLayoutMetrics(events, interactions):
    results = page_test_results.PageTestResults()
    results.WillRunPage(page.Page('file://blank.html'))
    layout.LayoutMetric()._AddResultsInternal(events, interactions, results)
    return dict((value.name, value.values)
                for value in results.current_page_run.values)