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

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

Issue 23681011: Android: splits cache_control and perf_control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More files Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « build/android/pylib/perf/perf_control.py ('k') | build/android/pylib/perf/thermal_throttle.py » ('j') | 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 Queue 5 import Queue
6 import datetime 6 import datetime
7 import logging 7 import logging
8 import re 8 import re
9 import threading 9 import threading
10 10
11 from pylib import perf_tests_helper
12
13 11
14 # Log marker containing SurfaceTexture timestamps. 12 # Log marker containing SurfaceTexture timestamps.
15 _SURFACE_TEXTURE_TIMESTAMPS_MESSAGE = 'SurfaceTexture update timestamps' 13 _SURFACE_TEXTURE_TIMESTAMPS_MESSAGE = 'SurfaceTexture update timestamps'
16 _SURFACE_TEXTURE_TIMESTAMP_RE = '\d+' 14 _SURFACE_TEXTURE_TIMESTAMP_RE = '\d+'
17 15
18 16
19 class SurfaceStatsCollector(object): 17 class SurfaceStatsCollector(object):
20 """Collects surface stats for a SurfaceView from the output of SurfaceFlinger. 18 """Collects surface stats for a SurfaceView from the output of SurfaceFlinger.
21 19
22 Args: 20 Args:
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 try: 287 try:
290 cur_surface = int(match.group(1), 16) 288 cur_surface = int(match.group(1), 16)
291 except Exception: 289 except Exception:
292 logging.error('Failed to parse current surface from ' + match.group(1)) 290 logging.error('Failed to parse current surface from ' + match.group(1))
293 else: 291 else:
294 logging.warning('Failed to call SurfaceFlinger surface ' + results[0]) 292 logging.warning('Failed to call SurfaceFlinger surface ' + results[0])
295 return { 293 return {
296 'page_flip_count': cur_surface, 294 'page_flip_count': cur_surface,
297 'timestamp': datetime.datetime.now(), 295 'timestamp': datetime.datetime.now(),
298 } 296 }
OLDNEW
« no previous file with comments | « build/android/pylib/perf/perf_control.py ('k') | build/android/pylib/perf/thermal_throttle.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698