Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Side by Side Diff: tools/telemetry/telemetry/web_perf/timeline_based_measurement.py

Issue 1254023003: Telemetry Test for WebRTC Rendering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Accomodate 'Serial' field definition change and minor fixes. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 import collections 4 import collections
5 from collections import defaultdict 5 from collections import defaultdict
6 6
7 from telemetry.timeline import model as model_module 7 from telemetry.timeline import model as model_module
8 from telemetry.timeline import tracing_category_filter 8 from telemetry.timeline import tracing_category_filter
9 from telemetry.timeline import tracing_options 9 from telemetry.timeline import tracing_options
10 from telemetry.value import trace 10 from telemetry.value import trace
11 from telemetry.web_perf.metrics import timeline_based_metric 11 from telemetry.web_perf.metrics import timeline_based_metric
12 from telemetry.web_perf.metrics import blob_timeline 12 from telemetry.web_perf.metrics import blob_timeline
13 from telemetry.web_perf.metrics import webrtc_rendering_timeline
13 from telemetry.web_perf.metrics import gpu_timeline 14 from telemetry.web_perf.metrics import gpu_timeline
14 from telemetry.web_perf.metrics import layout 15 from telemetry.web_perf.metrics import layout
15 from telemetry.web_perf.metrics import memory_timeline 16 from telemetry.web_perf.metrics import memory_timeline
16 from telemetry.web_perf.metrics import responsiveness_metric 17 from telemetry.web_perf.metrics import responsiveness_metric
17 from telemetry.web_perf.metrics import smoothness 18 from telemetry.web_perf.metrics import smoothness
18 from telemetry.web_perf.metrics import text_selection 19 from telemetry.web_perf.metrics import text_selection
19 from telemetry.web_perf import smooth_gesture_util 20 from telemetry.web_perf import smooth_gesture_util
20 from telemetry.web_perf import story_test 21 from telemetry.web_perf import story_test
21 from telemetry.web_perf import timeline_interaction_record as tir_module 22 from telemetry.web_perf import timeline_interaction_record as tir_module
22 23
(...skipping 15 matching lines...) Expand all
38 def _GetAllTimelineBasedMetrics(): 39 def _GetAllTimelineBasedMetrics():
39 # TODO(nednguyen): use discovery pattern to return all the instances of 40 # TODO(nednguyen): use discovery pattern to return all the instances of
40 # all TimelineBasedMetrics class in web_perf/metrics/ folder. 41 # all TimelineBasedMetrics class in web_perf/metrics/ folder.
41 # This cannot be done until crbug.com/460208 is fixed. 42 # This cannot be done until crbug.com/460208 is fixed.
42 return (smoothness.SmoothnessMetric(), 43 return (smoothness.SmoothnessMetric(),
43 responsiveness_metric.ResponsivenessMetric(), 44 responsiveness_metric.ResponsivenessMetric(),
44 layout.LayoutMetric(), 45 layout.LayoutMetric(),
45 gpu_timeline.GPUTimelineMetric(), 46 gpu_timeline.GPUTimelineMetric(),
46 blob_timeline.BlobTimelineMetric(), 47 blob_timeline.BlobTimelineMetric(),
47 memory_timeline.MemoryTimelineMetric(), 48 memory_timeline.MemoryTimelineMetric(),
48 text_selection.TextSelectionMetric()) 49 text_selection.TextSelectionMetric(),
50 webrtc_rendering_timeline.WebRtcRenderingTimelineMetric())
49 51
50 52
51 class InvalidInteractions(Exception): 53 class InvalidInteractions(Exception):
52 pass 54 pass
53 55
54 56
55 # TODO(nednguyen): Get rid of this results wrapper hack after we add interaction 57 # TODO(nednguyen): Get rid of this results wrapper hack after we add interaction
56 # record to telemetry value system (crbug.com/453109) 58 # record to telemetry value system (crbug.com/453109)
57 class ResultsWrapperInterface(object): 59 class ResultsWrapperInterface(object):
58 def __init__(self): 60 def __init__(self):
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 for renderer_thread, interaction_records in ( 285 for renderer_thread, interaction_records in (
284 threads_to_records_map.iteritems()): 286 threads_to_records_map.iteritems()):
285 meta_metrics = _TimelineBasedMetrics( 287 meta_metrics = _TimelineBasedMetrics(
286 model, renderer_thread, interaction_records, 288 model, renderer_thread, interaction_records,
287 self._results_wrapper, self._tbm_options.GetTimelineBasedMetrics()) 289 self._results_wrapper, self._tbm_options.GetTimelineBasedMetrics())
288 meta_metrics.AddResults(results) 290 meta_metrics.AddResults(results)
289 291
290 def DidRunStoryForPageTest(self, tracing_controller): 292 def DidRunStoryForPageTest(self, tracing_controller):
291 if tracing_controller.is_tracing_running: 293 if tracing_controller.is_tracing_running:
292 tracing_controller.Stop() 294 tracing_controller.Stop()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698