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

Side by Side Diff: build/android/pylib/perf/perf_control_unittest.py

Issue 2101243005: Add a snapshot of flutter/engine/src/build to our sdk (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add README.dart Created 4 years, 5 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 | « build/android/pylib/perf/perf_control.py ('k') | build/android/pylib/perf/setup.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4 # pylint: disable=W0212
5
6 import os
7 import sys
8 import unittest
9
10 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
11
12 from pylib.device import device_utils
13 from pylib.perf import perf_control
14
15 class TestPerfControl(unittest.TestCase):
16 def setUp(self):
17 if not os.getenv('BUILDTYPE'):
18 os.environ['BUILDTYPE'] = 'Debug'
19
20 devices = device_utils.DeviceUtils.HealthyDevices()
21 self.assertGreater(len(devices), 0, 'No device attached!')
22 self._device = devices[0]
23
24 def testHighPerfMode(self):
25 perf = perf_control.PerfControl(self._device)
26 try:
27 perf.SetPerfProfilingMode()
28 cpu_info = perf.GetCpuInfo()
29 self.assertEquals(len(perf._cpu_files), len(cpu_info))
30 for _, online, governor in cpu_info:
31 self.assertTrue(online)
32 self.assertEquals('performance', governor)
33 finally:
34 perf.SetDefaultPerfMode()
35
36 if __name__ == '__main__':
37 unittest.main()
OLDNEW
« no previous file with comments | « build/android/pylib/perf/perf_control.py ('k') | build/android/pylib/perf/setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698