telemetry.web_perf.timeline_based_measurement | index telemetry/web_perf/timeline_based_measurement.py

`# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.`

Modules
`` |  |
telemetry.web_perf.metrics.blob_timeline collections telemetry.web_perf.metrics.gpu_timeline telemetry.web_perf.metrics.indexeddb_timeline telemetry.web_perf.metrics.layout | logging telemetry.web_perf.metrics.memory_timeline telemetry.timeline.model telemetry.web_perf.metrics.responsiveness_metric telemetry.web_perf.smooth_gesture_util | telemetry.web_perf.metrics.smoothness telemetry.web_perf.story_test telemetry.web_perf.metrics.text_selection telemetry.web_perf.metrics.timeline_based_metric telemetry.web_perf.timeline_interaction_record | telemetry.value.trace telemetry.timeline.tracing_category_filter telemetry.timeline.tracing_options telemetry.web_perf.metrics.webrtc_rendering_timeline

Classes
`` |  | __builtin__.object Options ResultsWrapperInterface exceptions.Exception(exceptions.BaseException) InvalidInteractions telemetry.web_perf.story_test.StoryTest(__builtin__.object) TimelineBasedMeasurement
class InvalidInteractions(exceptions.Exception)
`` |  | Method resolution order: InvalidInteractions exceptions.Exception exceptions.BaseException __builtin__.object Data descriptors defined here: __weakref__ `list of weak references to the object (if defined)` Methods inherited from exceptions.Exception: __init__(...) `x.__init__(...) initializes x; see help(type(x)) for signature` Data and other attributes inherited from exceptions.Exception: __new__ = <built-in method __new__ of type object> `T.__new__(S, ...) -> a new object with type S, a subtype of T` Methods inherited from exceptions.BaseException: __delattr__(...) `x.__delattr__('name') <==> del x.name` __getattribute__(...) `x.__getattribute__('name') <==> x.name` __getitem__(...) `x.__getitem__(y) <==> x[y]` __getslice__(...) `x.__getslice__(i, j) <==> x[i:j] Use of negative indices is not supported.` __reduce__(...) __repr__(...) `x.__repr__() <==> repr(x)` __setattr__(...) `x.__setattr__('name', value) <==> x.name = value` __setstate__(...) __str__(...) `x.__str__() <==> str(x)` __unicode__(...) Data descriptors inherited from exceptions.BaseException: __dict__ args message
class Options(__builtin__.object)
`` | `A class to be used to configure TimelineBasedMeasurement. This is created and returned by Benchmark.CreateTimelineBasedMeasurementOptions. By default, all the timeline based metrics in telemetry/web_perf/metrics are used (see _GetAllTimelineBasedMetrics above). To customize your metric needs, use SetTimelineBasedMetrics().`
| Methods defined here: ExtendTraceCategoryFilter(self, filters) GetTimelineBasedMetrics(self) SetTimelineBasedMetrics(self, metrics) __init__(self, overhead_level='no-overhead') `As the amount of instrumentation increases, so does the overhead. The user of the measurement chooses the overhead level that is appropriate, and the tracing is filtered accordingly. overhead_level: Can either be a custom TracingCategoryFilter object or one of NO_OVERHEAD_LEVEL, MINIMAL_OVERHEAD_LEVEL or DEBUG_OVERHEAD_LEVEL.` Data descriptors defined here: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)` category_filter tracing_options
class ResultsWrapperInterface(__builtin__.object)
`` | `# TODO(nednguyen): Get rid of this results wrapper hack after we add interaction # record to telemetry value system (crbug.com/453109)`
| Methods defined here: AddValue(self, value) SetResults(self, results) SetTirLabel(self, tir_label) __init__(self) Data descriptors defined here: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)` current_page
class TimelineBasedMeasurement(telemetry.web_perf.story_test.StoryTest)
`` | `Collects multiple metrics based on their interaction records. A timeline based measurement shifts the burden of what metrics to collect onto the story under test. Instead of the measurement having a fixed set of values it collects, the story being tested issues (via javascript) an Interaction record into the user timing API that describing what is happening at that time, as well as a standardized set of flags describing the semantics of the work being done. The TimelineBasedMeasurement object collects a trace that includes both these interaction records, and a user-chosen amount of performance data using Telemetry's various timeline-producing APIs, tracing especially. It then passes the recorded timeline to different TimelineBasedMetrics based on those flags. As an example, this allows a single story run to produce load timing data, smoothness data, critical jank information and overall cpu usage information. For information on how to mark up a page to work with TimelineBasedMeasurement, refer to the perf.metrics.timeline_interaction_record module. Args: options: an instance of timeline_based_measurement.Options. results_wrapper: A class that has the __init__ method takes in the page_test_results object and the interaction record label. This class follows the ResultsWrapperInterface. Note: this class is not supported long term and to be removed when crbug.com/453109 is resolved.`
| Method resolution order: TimelineBasedMeasurement telemetry.web_perf.story_test.StoryTest __builtin__.object Methods defined here: DidRunStory(self, platform) `Clean up after running the story.` Measure(self, platform, results) `Collect all possible metrics and added them to results.` WillRunStory(self, platform) `Configure and start tracing.` __init__(self, options, results_wrapper=None) Data descriptors inherited from telemetry.web_perf.story_test.StoryTest: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)`

Data
`` |  | ALL_OVERHEAD_LEVELS = ['no-overhead', 'minimal-overhead', 'debug-overhead'] DEBUG_OVERHEAD_LEVEL = 'debug-overhead' MINIMAL_OVERHEAD_LEVEL = 'minimal-overhead' NO_OVERHEAD_LEVEL = 'no-overhead'