Ejemplo n.º 1
0
def SetupTelemetryPaths():
    chromium_src_dir = GetChromiumSrcDir()

    perf_path = os.path.join(chromium_src_dir, 'tools', 'perf')
    absolute_perf_path = os.path.abspath(perf_path)

    sys.path.append(absolute_perf_path)
    from chrome_telemetry_build import chromium_config

    telemetry_path = chromium_config.GetTelemetryDir()
    if telemetry_path not in sys.path:
        sys.path.append(telemetry_path)

    py_utils_path = os.path.join(chromium_src_dir, 'third_party', 'catapult',
                                 'common', 'py_utils')
    if py_utils_path not in sys.path:
        sys.path.append(py_utils_path)
Ejemplo n.º 2
0
def Init():
  chromium_src_dir = os.path.abspath(os.path.join(
    os.path.dirname(__file__), '..', '..', '..', '..'))

  perf_path = os.path.join(chromium_src_dir, 'tools', 'perf')
  absolute_perf_path = os.path.abspath(perf_path)

  sys.path.append(absolute_perf_path)
  from chrome_telemetry_build import chromium_config

  telemetry_path = chromium_config.GetTelemetryDir()
  if telemetry_path not in sys.path:
    sys.path.append(telemetry_path)

  catapult_base_path = os.path.join(
      chromium_src_dir, 'third_party', 'catapult', 'catapult_base')
  if catapult_base_path not in sys.path:
    sys.path.append(catapult_base_path)
Ejemplo n.º 3
0
import json
import os
import posixpath
import shutil
import subprocess
import sys
import tempfile
from time import sleep
import urllib

REPOSITORY_ROOT = os.path.abspath(
    os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..'))

sys.path.append(os.path.join(REPOSITORY_ROOT, 'tools', 'perf'))
from chrome_telemetry_build import chromium_config
sys.path.append(chromium_config.GetTelemetryDir())
sys.path.append(os.path.join(REPOSITORY_ROOT, 'build', 'android'))
sys.path.append(
    os.path.join(REPOSITORY_ROOT, 'third_party', 'catapult', 'devil'))

import android_rndis_forwarder
from devil.android import device_utils
from devil.android.sdk import intent
import lighttpd_server
from pylib import constants
from pylib import pexpect
from telemetry import android
from telemetry import benchmark
from telemetry import benchmark_runner
from telemetry import project_config
from telemetry import story
Ejemplo n.º 4
0
def GetTelemetryDir():
  return chromium_config.GetTelemetryDir()
Ejemplo n.º 5
0
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, 'perf'))

from chrome_telemetry_build import chromium_config

TELEMETRY_DIR = chromium_config.GetTelemetryDir()

_top_level_dir = os.path.dirname(os.path.realpath(__file__))

def Config(benchmark_subdirs):
  return chromium_config.ChromiumConfig(
      top_level_dir=_top_level_dir,
      benchmark_dirs=[os.path.join(_top_level_dir, subdir)
                      for subdir in benchmark_subdirs])
Ejemplo n.º 6
0
# found in the LICENSE file.

import logging
import os
import subprocess
import sys
import time

# Add the telemetry directory to Python's search paths.
current_directory = os.path.dirname(os.path.realpath(__file__))
perf_dir = os.path.realpath(
    os.path.join(current_directory, '..', '..', '..', 'tools', 'perf'))
if perf_dir not in sys.path:
    sys.path.append(perf_dir)
from chrome_telemetry_build import chromium_config
telemetry_dir = chromium_config.GetTelemetryDir()
if telemetry_dir not in sys.path:
    sys.path.append(telemetry_dir)

from telemetry.internal.browser import browser_options
from telemetry.internal.browser import browser_finder
from telemetry.core import exceptions
from telemetry.core import util
from telemetry.core import cros_interface
from telemetry.internal.browser import extension_to_load

logger = logging.getLogger('proximity_auth.%s' % __name__)


class AccountPickerScreen(object):
    """ Wrapper for the ChromeOS account picker screen.
Ejemplo n.º 7
0
#!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import os
import sys
import tempfile

from chrome_telemetry_build import chromium_config
sys.path.insert(1, chromium_config.GetTelemetryDir())

from telemetry.internal.browser import browser_finder
from telemetry.internal.browser import browser_options


def _RunPrebuilt(options):
    browser_to_create = browser_finder.FindBrowser(options)
    with browser_to_create.Create(options) as browser:
        output_file = os.path.join(tempfile.mkdtemp(), options.profiler)
        raw_input('Press enter to start profiling...')
        print '>> Starting profiler', options.profiler
        browser.profiling_controller.Start(options.profiler, output_file)
        try:
            raw_input('Press enter or CTRL+C to stop')
        except KeyboardInterrupt:
            pass
        finally:
            print '<< Stopping ...',
            sys.stdout.flush()
            browser.profiling_controller.Stop()