| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 | 4 |
| 5 from metrics import memory | 5 from metrics import memory |
| 6 from telemetry.page import page_measurement | 6 from telemetry.page import page_measurement |
| 7 | 7 |
| 8 class Memory(page_measurement.PageMeasurement): | 8 class Memory(page_measurement.PageMeasurement): |
| 9 def __init__(self): | 9 def __init__(self): |
| 10 super(Memory, self).__init__('stress_memory') | 10 super(Memory, self).__init__('stress_memory') |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 # intervals (~20 secs). | 34 # intervals (~20 secs). |
| 35 # This is a minor optimization to ensure it'll dump the last file when | 35 # This is a minor optimization to ensure it'll dump the last file when |
| 36 # the test completes. | 36 # the test completes. |
| 37 tab.ExecuteJavaScript(""" | 37 tab.ExecuteJavaScript(""" |
| 38 if (chrome && chrome.memoryBenchmarking) { | 38 if (chrome && chrome.memoryBenchmarking) { |
| 39 chrome.memoryBenchmarking.heapProfilerDump('renderer', 'final'); | 39 chrome.memoryBenchmarking.heapProfilerDump('renderer', 'final'); |
| 40 chrome.memoryBenchmarking.heapProfilerDump('browser', 'final'); | 40 chrome.memoryBenchmarking.heapProfilerDump('browser', 'final'); |
| 41 } | 41 } |
| 42 """) | 42 """) |
| 43 | 43 |
| 44 def DidRunTest(self, tab, results): | 44 def DidRunTest(self, browser, results): |
| 45 self._memory_metric.AddSummaryResults(results) | 45 self._memory_metric.AddSummaryResults(results) |
| OLD | NEW |