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

Side by Side Diff: tools/skpbench/_hardware.py

Issue 2360473002: Add hardware monitoring to skpbench (Closed)
Patch Set: Add hardware monitoring to skpbench Created 4 years, 2 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 | « tools/skpbench/_adb_path.py ('k') | tools/skpbench/_hardware_android.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 2016 Google Inc.
2 #
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import time
7
8 class HardwareException(Exception):
9 def __init__(self, message, sleeptime=60):
10 Exception.__init__(self, message)
11 self.sleeptime = sleeptime
12
13 class Hardware:
14 def __init__(self):
15 self.kick_in_time = 0
16
17 def __enter__(self):
18 return self
19
20 def __exit__(self, exception_type, exception_value, traceback):
21 pass
22
23 def sanity_check(self):
24 '''Raises a HardwareException if any hardware state is not as expected.'''
25 pass
26
27 def sleep(self, sleeptime):
28 '''Puts the hardware into a resting state for a fixed amount of time.'''
29 time.sleep(sleeptime)
OLDNEW
« no previous file with comments | « tools/skpbench/_adb_path.py ('k') | tools/skpbench/_hardware_android.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698