Ejemplo n.º 1
0
def GetBlobMetrics(events, interactions):
  results = page_test_results.PageTestResults()
  test_page = page.Page('file://blank.html')
  results.WillRunPage(test_page)
  blob_timeline.BlobTimelineMetric()._AddWriteResultsInternal(
      events, interactions, results)  # pylint:disable=protected-access
  blob_timeline.BlobTimelineMetric()._AddReadResultsInternal(
      events, interactions, results)  # pylint:disable=protected-access
  return_dict = dict((value.name, value.values) for value in
                     results.current_page_run.values)
  results.DidRunPage(test_page)
  return return_dict
Ejemplo n.º 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())
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())