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

Side by Side Diff: build/android/adb_profile_chrome.py

Issue 189843012: Fix trace2html conversion broken by last trace-viewer deps roll (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import base64 7 import base64
8 import gzip 8 import gzip
9 import logging 9 import logging
10 import optparse 10 import optparse
11 import os 11 import os
12 import re 12 import re
13 import select 13 import select
14 import shutil 14 import shutil
15 import sys 15 import sys
16 import threading 16 import threading
17 import time 17 import time
18 import webbrowser 18 import webbrowser
19 import zipfile 19 import zipfile
20 import zlib 20 import zlib
21 21
22 from pylib import android_commands 22 from pylib import android_commands
23 from pylib import cmd_helper 23 from pylib import cmd_helper
24 from pylib import constants 24 from pylib import constants
25 from pylib import pexpect 25 from pylib import pexpect
26 26
27 _TRACE_VIEWER_ROOT = os.path.join(constants.DIR_SOURCE_ROOT, 27 _TRACE_VIEWER_ROOT = os.path.join(constants.DIR_SOURCE_ROOT,
28 'third_party', 'trace-viewer') 28 'third_party', 'trace-viewer')
29 sys.path.append(_TRACE_VIEWER_ROOT) 29 sys.path.append(_TRACE_VIEWER_ROOT)
30 from build import trace2html 30 from trace_viewer.build import trace2html
31 31
32 _DEFAULT_CHROME_CATEGORIES = '_DEFAULT_CHROME_CATEGORIES' 32 _DEFAULT_CHROME_CATEGORIES = '_DEFAULT_CHROME_CATEGORIES'
33 33
34 34
35 def _GetTraceTimestamp(): 35 def _GetTraceTimestamp():
36 return time.strftime('%Y-%m-%d-%H%M%S', time.localtime()) 36 return time.strftime('%Y-%m-%d-%H%M%S', time.localtime())
37 37
38 38
39 class ChromeTracingController(object): 39 class ChromeTracingController(object):
40 def __init__(self, adb, package_info, categories, ring_buffer): 40 def __init__(self, adb, package_info, categories, ring_buffer):
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 options.json) 417 options.json)
418 if options.view: 418 if options.view:
419 if sys.platform == 'darwin': 419 if sys.platform == 'darwin':
420 os.system('/usr/bin/open %s' % os.path.abspath(result)) 420 os.system('/usr/bin/open %s' % os.path.abspath(result))
421 else: 421 else:
422 webbrowser.open(result) 422 webbrowser.open(result)
423 423
424 424
425 if __name__ == '__main__': 425 if __name__ == '__main__':
426 sys.exit(main()) 426 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698