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

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

Issue 1315743004: [Android] Add a custom pylintrc for build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix appurify_sanitized import-errors Created 5 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
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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
7 import logging
8 import re
9 import threading 6 import threading
10 7
11 from devil.android import device_utils
12
13 8
14 # Log marker containing SurfaceTexture timestamps. 9 # Log marker containing SurfaceTexture timestamps.
15 _SURFACE_TEXTURE_TIMESTAMPS_MESSAGE = 'SurfaceTexture update timestamps' 10 _SURFACE_TEXTURE_TIMESTAMPS_MESSAGE = 'SurfaceTexture update timestamps'
16 _SURFACE_TEXTURE_TIMESTAMP_RE = r'\d+' 11 _SURFACE_TEXTURE_TIMESTAMP_RE = r'\d+'
17 12
18 13
19 class SurfaceStatsCollector(object): 14 class SurfaceStatsCollector(object):
20 """Collects surface stats for a SurfaceView from the output of SurfaceFlinger. 15 """Collects surface stats for a SurfaceView from the output of SurfaceFlinger.
21 16
22 Args: 17 Args:
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 fields = line.split() 174 fields = line.split()
180 if len(fields) != 3: 175 if len(fields) != 3:
181 continue 176 continue
182 timestamp = long(fields[1]) 177 timestamp = long(fields[1])
183 if timestamp == pending_fence_timestamp: 178 if timestamp == pending_fence_timestamp:
184 continue 179 continue
185 timestamp /= nanoseconds_per_millisecond 180 timestamp /= nanoseconds_per_millisecond
186 timestamps.append(timestamp) 181 timestamps.append(timestamp)
187 182
188 return (refresh_period, timestamps) 183 return (refresh_period, timestamps)
OLDNEW
« no previous file with comments | « build/android/pylib/perf/setup.py ('k') | build/android/pylib/perf/surface_stats_collector_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698