Commit 46d8f4c5 authored by alokp@chromium.org's avatar alokp@chromium.org

Move adb_profile_chrome to profile_chrome.

This is being done with the intention to port this tool to other
platforms. The first step is to move the existing code to a common
location.

Review URL: https://codereview.chromium.org/402803005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284207 0039d316-1c4b-4281-b951-d872f2087c98
parent 415038a6
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
# found in the LICENSE file. # found in the LICENSE file.
# #
# Start / stop profiling in chrome. # Start / stop profiling in chrome.
exec $(dirname $0)/../../tools/android/adb_profile_chrome.py $@ exec $(dirname $0)/../../tools/profile_chrome.py $@
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
import sys import sys
from adb_profile_chrome import main from profile_chrome import main
if __name__ == '__main__': if __name__ == '__main__':
......
# Copyright 2014 The Chromium Authors. All rights reserved. # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import os import os
import sys import sys
sys.path.append(os.path.join(os.path.dirname(__file__), sys.path.append(os.path.join(os.path.dirname(__file__),
os.pardir, os.pardir, os.pardir, os.pardir, os.pardir,
'build', 'android')) 'build', 'android'))
...@@ -7,11 +7,12 @@ import os ...@@ -7,11 +7,12 @@ import os
import re import re
import time import time
from adb_profile_chrome import controllers from profile_chrome import controllers
from pylib import pexpect from pylib import pexpect
from pylib.device import intent from pylib.device import intent
_HEAP_PROFILE_MMAP_PROPERTY = 'heapprof.mmap' _HEAP_PROFILE_MMAP_PROPERTY = 'heapprof.mmap'
class ChromeTracingController(controllers.BaseController): class ChromeTracingController(controllers.BaseController):
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
import os import os
import json import json
from adb_profile_chrome import chrome_controller from profile_chrome import chrome_controller
from adb_profile_chrome import controllers_unittest from profile_chrome import controllers_unittest
class ChromeControllerTest(controllers_unittest.BaseControllerTest): class ChromeControllerTest(controllers_unittest.BaseControllerTest):
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import exceptions import exceptions
# pylint: disable=R0201 # pylint: disable=R0201
class BaseController(object): class BaseController(object):
def StartTracing(self, _): def StartTracing(self, _):
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
import unittest import unittest
from adb_profile_chrome import profiler from profile_chrome import profiler
from pylib import android_commands from pylib import android_commands
from pylib.device import device_utils from pylib.device import device_utils
......
...@@ -10,11 +10,11 @@ import os ...@@ -10,11 +10,11 @@ import os
import sys import sys
import webbrowser import webbrowser
from adb_profile_chrome import chrome_controller from profile_chrome import chrome_controller
from adb_profile_chrome import perf_controller from profile_chrome import perf_controller
from adb_profile_chrome import profiler from profile_chrome import profiler
from adb_profile_chrome import systrace_controller from profile_chrome import systrace_controller
from adb_profile_chrome import ui from profile_chrome import ui
from pylib import android_commands from pylib import android_commands
from pylib.device import device_utils from pylib.device import device_utils
......
...@@ -8,8 +8,8 @@ import subprocess ...@@ -8,8 +8,8 @@ import subprocess
import sys import sys
import tempfile import tempfile
from adb_profile_chrome import controllers from profile_chrome import controllers
from adb_profile_chrome import ui from profile_chrome import ui
from pylib import android_commands from pylib import android_commands
from pylib import constants from pylib import constants
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
import os import os
import json import json
from adb_profile_chrome import controllers_unittest from profile_chrome import controllers_unittest
from adb_profile_chrome import perf_controller from profile_chrome import perf_controller
from adb_profile_chrome import ui from profile_chrome import ui
from pylib import constants from pylib import constants
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
import os import os
from adb_profile_chrome import trace_packager from profile_chrome import trace_packager
from adb_profile_chrome import ui from profile_chrome import ui
from pylib import constants from pylib import constants
......
...@@ -7,8 +7,8 @@ import tempfile ...@@ -7,8 +7,8 @@ import tempfile
import unittest import unittest
import zipfile import zipfile
from adb_profile_chrome import profiler from profile_chrome import profiler
from adb_profile_chrome import ui from profile_chrome import ui
class FakeController(object): class FakeController(object):
......
#!/bin/sh #!/bin/sh
cd $(dirname $0)/../ cd $(dirname $0)/../
exec python -m unittest discover adb_profile_chrome '*_unittest.py' $@ exec python -m unittest discover profile_chrome '*_unittest.py' $@
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
import threading import threading
import zlib import zlib
from adb_profile_chrome import controllers from profile_chrome import controllers
from adb_profile_chrome import util from profile_chrome import util
from pylib import cmd_helper from pylib import cmd_helper
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
import os import os
from adb_profile_chrome import controllers_unittest from profile_chrome import controllers_unittest
from adb_profile_chrome import systrace_controller from profile_chrome import systrace_controller
class SystraceControllerTest(controllers_unittest.BaseControllerTest): class SystraceControllerTest(controllers_unittest.BaseControllerTest):
......
...@@ -9,7 +9,7 @@ import shutil ...@@ -9,7 +9,7 @@ import shutil
import sys import sys
import zipfile import zipfile
from adb_profile_chrome import util from profile_chrome import util
from pylib import constants from pylib import constants
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
from adb_profile_chrome import trace_packager
import json import json
import tempfile import tempfile
import unittest import unittest
from profile_chrome import trace_packager
class TracePackagerTest(unittest.TestCase): class TracePackagerTest(unittest.TestCase):
def testJsonTraceMerging(self): def testJsonTraceMerging(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment