run_perf_tests.py
def perform_systrace(sdk_path, device_id, dest_dir, package_name):
    """Execution code for a systrace thread."""

    package_parameter = '--app=' + package_name
    systrace_path = os.path.join(sdk_path, 'platform-tools', 'systrace',
                                 'systrace.py')
    systrace_command = ['python', systrace_path,
                        '--serial=' + device_id,
                        package_parameter,
                        '--time=20',
                        '-o', os.path.join(dest_dir, 'trace.html'),
                        'gfx', 'input', 'view', 'wm', 'am', 'sm', 'hal',
                        'app', 'res', 'dalvik', 'power', 'freq', 'freq',
                        'idle', 'load']
    print 'Executing systrace'
    systrace_log_path = os.path.join(dest_dir, 'logs', 'capture_systrace.log')
    with open(systrace_log_path, 'w') as systrace_log:
        try:
            subprocess.call(systrace_command,
                            stdout=systrace_log,
                            stderr=subprocess.STDOUT,
                            shell=False)
        except OSError:
            print 'ERROR executing systrace ' + os_error
    print 'Done systrace logging'
Execution code for a systrace thread.
Execution code for a systrace thread.
Execution code for a systrace thread .
def perform_systrace(sdk_path, device_id, dest_dir, package_name):
    package_parameter = '--app=' + package_name
    systrace_path = os.path.join(sdk_path, 'platform-tools', 'systrace',
                                 'systrace.py')
    systrace_command = ['python', systrace_path,
                        '--serial=' + device_id,
                        package_parameter,
                        '--time=20',
                        '-o', os.path.join(dest_dir, 'trace.html'),
                        'gfx', 'input', 'view', 'wm', 'am', 'sm', 'hal',
                        'app', 'res', 'dalvik', 'power', 'freq', 'freq',
                        'idle', 'load']
    print 'Executing systrace'
    systrace_log_path = os.path.join(dest_dir, 'logs', 'capture_systrace.log')
    with open(systrace_log_path, 'w') as systrace_log:
        try:
            subprocess.call(systrace_command,
                            stdout=systrace_log,
                            stderr=subprocess.STDOUT,
                            shell=False)
        except OSError:
            print 'ERROR executing systrace ' + os_error
    print 'Done systrace logging'
def perform_systrace ( sdk_path , device_id , dest_dir , package_name ) : package_parameter = '--app=' + package_name systrace_path = os . path . join ( sdk_path , 'platform-tools' , 'systrace' , 'systrace.py' ) systrace_command = [ 'python' , systrace_path , '--serial=' + device_id , package_parameter , '--time=20' , '-o' , os . path . join ( dest_dir , 'trace.html' ) , 'gfx' , 'input' , 'view' , 'wm' , 'am' , 'sm' , 'hal' , 'app' , 'res' , 'dalvik' , 'power' , 'freq' , 'freq' , 'idle' , 'load' ] print 'Executing systrace' systrace_log_path = os . path . join ( dest_dir , 'logs' , 'capture_systrace.log' ) with open ( systrace_log_path , 'w' ) as systrace_log : try : subprocess . call ( systrace_command , stdout = systrace_log , stderr = subprocess . STDOUT , shell = False ) except OSError : print 'ERROR executing systrace ' + os_error print 'Done systrace logging'
Execution code for a systrace thread.
Execution code for a systrace thread .
"""Execution code for a systrace thread."""
sdk_path
device_id
dest_dir
package_name