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

Side by Side Diff: tools/android/loading/deprecated/log_parser.py

Issue 1619713002: Upgrade analyze.py and related scripts to new world order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 11 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/android/loading/analyze.py ('k') | tools/android/loading/deprecated/log_requests.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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 """Parses a JSON request log created by log_requests.py.""" 5 """Parses a JSON request log created by log_requests.py."""
6 6
7 import collections 7 import collections
8 import json 8 import json
9 import operator 9 import operator
10 import urlparse 10 import urlparse
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 or len(cache_control) == 0): 209 or len(cache_control) == 0):
210 return -1 210 return -1
211 if 'max-age' in cache_control: 211 if 'max-age' in cache_control:
212 return int(cache_control['max-age']) 212 return int(cache_control['max-age'])
213 return -1 213 return -1
214 214
215 215
216 def SortedByCompletion(requests): 216 def SortedByCompletion(requests):
217 """Returns the requests, sorted by completion time.""" 217 """Returns the requests, sorted by completion time."""
218 return sorted(requests, key=operator.attrgetter('timestamp')) 218 return sorted(requests, key=operator.attrgetter('timestamp'))
OLDNEW
« no previous file with comments | « tools/android/loading/analyze.py ('k') | tools/android/loading/deprecated/log_requests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698