Commit 1e17031a authored by Charlie Andrews's avatar Charlie Andrews Committed by Commit Bot

Move Chromium-side callers of StopTracing() use only the tuple return

This is the last part of a three-sided change in which the return value
of StopTracing() was changed from a TraceValue object to a (TraceValue
object, list of nonfatal exceptions) tuple.

Bug: catapult:#3798
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I6e237ce13f7cf263ca453fa47c859f65d1c051b8
Reviewed-on: https://chromium-review.googlesource.com/827549Reviewed-by: default avatarCharlie Andrews <charliea@chromium.org>
Reviewed-by: default avatarNed Nguyen <nednguyen@google.com>
Commit-Queue: Charlie Andrews <charliea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524162}
parent d9bd4752
......@@ -93,14 +93,7 @@ class TraceIntegrationTest(gpu_integration_test.GpuIntegrationTest):
'domAutomationController._finished', timeout=30)
# Stop tracing.
timeline_data = tab.browser.platform.tracing_controller.StopTracing()
# TODO(charliea): This is part of a three-sided Chromium/Telemetry patch
# where we're changing the return type of StopTracing from a TraceValue to a
# (TraceValue, nonfatal_exception_list) tuple. Once the tuple return value
# lands in Chromium, the non-tuple logic should be deleted.
if isinstance(timeline_data, tuple):
timeline_data = timeline_data[0]
timeline_data = tab.browser.platform.tracing_controller.StopTracing()[0]
# Evaluate success.
timeline_model = model_module.TimelineModel(timeline_data)
......
......@@ -267,15 +267,7 @@ class _BlinkPerfMeasurement(legacy_page_test.LegacyPageTest):
tab.EvaluateJavaScript('testRunner.scheduleTestRun()')
tab.WaitForJavaScriptCondition('testRunner.isDone')
trace_data = tab.browser.platform.tracing_controller.StopTracing()
# TODO(charliea): This is part of a three-sided Chromium/Telemetry patch
# where we're changing the return type of StopTracing from a TraceValue to a
# (TraceValue, nonfatal_exception_list) tuple. Once the tuple return value
# lands in Chromium, the non-tuple logic should be deleted.
if isinstance(trace_data, tuple):
trace_data = trace_data[0]
trace_data = tab.browser.platform.tracing_controller.StopTracing()[0]
return trace_data
......
......@@ -146,15 +146,7 @@ class _OilpanGCTimesBase(legacy_page_test.LegacyPageTest):
def ValidateAndMeasurePage(self, page, tab, results):
del page # unused
timeline_data = tab.browser.platform.tracing_controller.StopTracing()
# TODO(charliea): This is part of a three-sided Chromium/Telemetry patch
# where we're changing the return type of StopTracing from a TraceValue to a
# (TraceValue, nonfatal_exception_list) tuple. Once the tuple return value
# lands in Chromium, the non-tuple logic should be deleted.
if isinstance(timeline_data, tuple):
timeline_data = timeline_data[0]
timeline_data = tab.browser.platform.tracing_controller.StopTracing()[0]
timeline_model = TimelineModel(timeline_data)
threads = timeline_model.GetAllThreads()
for thread in threads:
......
......@@ -25,14 +25,7 @@ class ClockDomainTest(tab_test_case.TabTestCase):
options.enable_chrome_trace = True
tracing_controller.StartTracing(options)
full_trace = tracing_controller.StopTracing()
# TODO(charliea): This is part of a three-sided Chromium/Telemetry patch
# where we're changing the return type of StopTracing from a TraceValue to a
# (TraceValue, nonfatal_exception_list) tuple. Once the tuple return value
# lands in Chromium, the non-tuple logic should be deleted.
if isinstance(full_trace, tuple):
full_trace = full_trace[0]
full_trace = tracing_controller.StopTracing()[0]
chrome_sync = GetSyncEvents(
full_trace.GetTraceFor(trace_data.CHROME_TRACE_PART)['traceEvents'])
......
......@@ -38,15 +38,7 @@ class DrawProperties(legacy_page_test.LegacyPageTest):
def ValidateAndMeasurePage(self, page, tab, results):
del page # unused
timeline_data = tab.browser.platform.tracing_controller.StopTracing()
# TODO(charliea): This is part of a three-sided Chromium/Telemetry patch
# where we're changing the return type of StopTracing from a TraceValue to a
# (TraceValue, nonfatal_exception_list) tuple. Once the tuple return value
# lands in Chromium, the non-tuple logic should be deleted.
if isinstance(timeline_data, tuple):
timeline_data = timeline_data[0]
timeline_data = tab.browser.platform.tracing_controller.StopTracing()[0]
timeline_model = model.TimelineModel(timeline_data)
pt_avg = self.ComputeAverageOfDurations(
......
......@@ -48,15 +48,7 @@ class ImageDecoding(legacy_page_test.LegacyPageTest):
tab.browser.platform.tracing_controller.StartTracing(config)
def ValidateAndMeasurePage(self, page, tab, results):
timeline_data = tab.browser.platform.tracing_controller.StopTracing()
# TODO(charliea): This is part of a three-sided Chromium/Telemetry patch
# where we're changing the return type of StopTracing from a TraceValue to a
# (TraceValue, nonfatal_exception_list) tuple. Once the tuple return value
# lands in Chromium, the non-tuple logic should be deleted.
if isinstance(timeline_data, tuple):
timeline_data = timeline_data[0]
timeline_data = tab.browser.platform.tracing_controller.StopTracing()[0]
timeline_model = model.TimelineModel(timeline_data)
self._power_metric.Stop(page, tab)
self._power_metric.AddResults(tab, results)
......
......@@ -58,15 +58,7 @@ class Smoothness(legacy_page_test.LegacyPageTest):
def ValidateAndMeasurePage(self, _, tab, results):
self._results = results
trace_result = tab.browser.platform.tracing_controller.StopTracing()
# TODO(charliea): This is part of a three-sided Chromium/Telemetry patch
# where we're changing the return type of StopTracing from a TraceValue to a
# (TraceValue, nonfatal_exception_list) tuple. Once the tuple return value
# lands in Chromium, the non-tuple logic should be deleted.
if isinstance(trace_result, tuple):
trace_result = trace_result[0]
trace_result = tab.browser.platform.tracing_controller.StopTracing()[0]
trace_value = trace.TraceValue(
results.current_page, trace_result,
file_path=results.telemetry_info.trace_local_path,
......@@ -83,16 +75,8 @@ class Smoothness(legacy_page_test.LegacyPageTest):
def DidRunPage(self, platform):
if platform.tracing_controller.is_tracing_running:
trace_result = platform.tracing_controller.StopTracing()
trace_result = platform.tracing_controller.StopTracing()[0]
if self._results:
# TODO(charliea): This is part of a three-sided Chromium/Telemetry patch
# where we're changing the return type of StopTracing from a TraceValue
# to a (TraceValue, nonfatal_exception_list) tuple. Once the tuple
# return value lands in Chromium, the non-tuple logic should be deleted.
if isinstance(trace_result, tuple):
trace_result = trace_result[0]
trace_value = trace.TraceValue(
self._results.current_page, trace_result,
file_path=self._results.telemetry_info.trace_local_path,
......
......@@ -53,15 +53,7 @@ class TaskExecutionTime(legacy_page_test.LegacyPageTest):
def ValidateAndMeasurePage(self, page, tab, results):
del page # unused
trace_data = tab.browser.platform.tracing_controller.StopTracing()
# TODO(charliea): This is part of a three-sided Chromium/Telemetry patch
# where we're changing the return type of StopTracing from a TraceValue to a
# (TraceValue, nonfatal_exception_list) tuple. Once the tuple return value
# lands in Chromium, the non-tuple logic should be deleted.
if isinstance(trace_data, tuple):
trace_data = trace_data[0]
trace_data = tab.browser.platform.tracing_controller.StopTracing()[0]
timeline_model = TimelineModel(trace_data)
self._renderer_process = timeline_model.GetRendererProcessFromTabId(tab.id)
......
......@@ -52,14 +52,7 @@ class TimelineController(object):
if self._enable_auto_issuing_record:
self._interaction.End()
# Stop tracing.
timeline_data = tab.browser.platform.tracing_controller.StopTracing()
# TODO(charliea): This is part of a three-sided Chromium/Telemetry patch
# where we're changing the return type of StopTracing from a TraceValue to a
# (TraceValue, nonfatal_exception_list) tuple. Once the tuple return value
# lands in Chromium, the non-tuple logic should be deleted.
if isinstance(timeline_data, tuple):
timeline_data = timeline_data[0]
timeline_data = tab.browser.platform.tracing_controller.StopTracing()[0]
# TODO(#763375): Rely on results.telemetry_info.trace_local_path/etc.
kwargs = {}
......
......@@ -34,15 +34,7 @@ class V8GCTimes(legacy_page_test.LegacyPageTest):
def ValidateAndMeasurePage(self, page, tab, results):
del page # unused
trace_data = tab.browser.platform.tracing_controller.StopTracing()
# TODO(charliea): This is part of a three-sided Chromium/Telemetry patch
# where we're changing the return type of StopTracing from a TraceValue to a
# (TraceValue, nonfatal_exception_list) tuple. Once the tuple return value
# lands in Chromium, the non-tuple logic should be deleted.
if isinstance(trace_data, tuple):
trace_data = trace_data[0]
trace_data = tab.browser.platform.tracing_controller.StopTracing()[0]
timeline_model = TimelineModel(trace_data)
renderer_process = timeline_model.GetRendererProcessFromTabId(tab.id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment