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

Side by Side Diff: build/android/pylib/perf_tests_helper.py

Issue 12847011: Remove unused PerfTestSetup class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 import re 5 import re
6 import sys 6 import sys
7 7
8 import android_commands 8 import android_commands
9 import json 9 import json
10 import math 10 import math
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 def RestoreOriginalPerfMode(self): 173 def RestoreOriginalPerfMode(self):
174 """Resets the original performance mode of the device.""" 174 """Resets the original performance mode of the device."""
175 self._SetScalingGovernorInternal(self._original_scaling_governor) 175 self._SetScalingGovernorInternal(self._original_scaling_governor)
176 176
177 def _SetScalingGovernorInternal(self, value): 177 def _SetScalingGovernorInternal(self, value):
178 for cpu in range(self._kernel_max + 1): 178 for cpu in range(self._kernel_max + 1):
179 scaling_governor_file = PerfControl._SCALING_GOVERNOR_FMT % cpu 179 scaling_governor_file = PerfControl._SCALING_GOVERNOR_FMT % cpu
180 if self._adb.FileExistsOnDevice(scaling_governor_file): 180 if self._adb.FileExistsOnDevice(scaling_governor_file):
181 self._adb.SetProtectedFileContents(scaling_governor_file, value) 181 self._adb.SetProtectedFileContents(scaling_governor_file, value)
182
183
184 class PerfTestSetup(PerfControl):
185 """Provides methods for setting up a device for perf testing.
186
187 TODO(aberent): remove once all tests have been moved to the new classes
188 """
189
190 def DropRamCaches(self):
191 CacheControl(self._adb).DropRamCaches()
192
193 def SetUp(self):
194 self.SetHighPerfMode()
195 self.DropRamCaches()
196
197 def TearDown(self):
198 self.ResetOriginalPerfMode()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698