tools/cygprofile/orderfile_generator_backend.py
def RunBenchmark(self, out_directory, no_orderfile=False):
    """Builds chrome apk and runs performance and memory benchmarks.

    Builds a non-instrumented version of chrome.
    Installs chrome apk on the device.
    Runs Speedometer2.0 benchmark to assess performance.
    Runs system_health.memory_mobile to evaluate memory footprint.

    Args:
      out_directory: (str) Path to out directory for this build.
      no_orderfile: (bool) True if chrome to be built without orderfile.

    Returns:
      benchmark_results: (dict) Results extracted from benchmarks.
    """
    benchmark_results = {}
    try:
      _UnstashOutputDirectory(out_directory)
      self._compiler = ClankCompiler(out_directory, self._step_recorder,
                                     self._options.arch, self._options.use_goma,
                                     self._options.goma_dir,
                                     self._options.system_health_orderfile,
                                     self._monochrome, self._options.public,
                                     self._GetPathToOrderfile())

      if no_orderfile:
        orderfile_path = self._GetPathToOrderfile()
        backup_orderfile = orderfile_path + '.backup'
        shutil.move(orderfile_path, backup_orderfile)
        open(orderfile_path, 'w').close()

      # Build APK to be installed on the device.
      self._compiler.CompileChromeApk(instrumented=False,
                                      use_call_graph=False,
                                      force_relink=True)
      benchmark_results['Speedometer2.0'] = self._PerformanceBenchmark(
          self._compiler.chrome_apk)
      benchmark_results['orderfile.memory_mobile'] = (
          self._NativeCodeMemoryBenchmark(self._compiler.chrome_apk))

    except Exception as e:
      benchmark_results['Error'] = str(e)

    finally:
      if no_orderfile and os.path.exists(backup_orderfile):
        shutil.move(backup_orderfile, orderfile_path)
      _StashOutputDirectory(out_directory)

    return benchmark_results
Builds chrome apk and runs performance and memory benchmarks.

    Builds a non-instrumented version of chrome.
    Installs chrome apk on the device.
    Runs Speedometer2.0 benchmark to assess performance.
    Runs system_health.memory_mobile to evaluate memory footprint.

    Args:
      out_directory: (str) Path to out directory for this build.
      no_orderfile: (bool) True if chrome to be built without orderfile.

    Returns:
      benchmark_results: (dict) Results extracted from benchmarks.
    
Builds chrome apk and runs performance and memory benchmarks.
Builds a non-instrumented version of chrome.
Installs chrome apk on the device.
Runs Speedometer2.0 benchmark to assess performance.
Builds chrome apk and runs performance and memory benchmarks . Builds a non - instrumented version of chrome . Installs chrome apk on the device . Runs Speedometer2 . 0 benchmark to assess performance .
def RunBenchmark(self, out_directory, no_orderfile=False):
    benchmark_results = {}
    try:
      _UnstashOutputDirectory(out_directory)
      self._compiler = ClankCompiler(out_directory, self._step_recorder,
                                     self._options.arch, self._options.use_goma,
                                     self._options.goma_dir,
                                     self._options.system_health_orderfile,
                                     self._monochrome, self._options.public,
                                     self._GetPathToOrderfile())
      if no_orderfile:
        orderfile_path = self._GetPathToOrderfile()
        backup_orderfile = orderfile_path + '.backup'
        shutil.move(orderfile_path, backup_orderfile)
        open(orderfile_path, 'w').close()
      self._compiler.CompileChromeApk(instrumented=False,
                                      use_call_graph=False,
                                      force_relink=True)
      benchmark_results['Speedometer2.0'] = self._PerformanceBenchmark(
          self._compiler.chrome_apk)
      benchmark_results['orderfile.memory_mobile'] = (
          self._NativeCodeMemoryBenchmark(self._compiler.chrome_apk))
    except Exception as e:
      benchmark_results['Error'] = str(e)
    finally:
      if no_orderfile and os.path.exists(backup_orderfile):
        shutil.move(backup_orderfile, orderfile_path)
      _StashOutputDirectory(out_directory)
    return benchmark_results
def RunBenchmark ( self , out_directory , no_orderfile = False ) : benchmark_results = { } try : _UnstashOutputDirectory ( out_directory ) self . _compiler = ClankCompiler ( out_directory , self . _step_recorder , self . _options . arch , self . _options . use_goma , self . _options . goma_dir , self . _options . system_health_orderfile , self . _monochrome , self . _options . public , self . _GetPathToOrderfile ( ) ) if no_orderfile : orderfile_path = self . _GetPathToOrderfile ( ) backup_orderfile = orderfile_path + '.backup' shutil . move ( orderfile_path , backup_orderfile ) open ( orderfile_path , 'w' ) . close ( ) self . _compiler . CompileChromeApk ( instrumented = False , use_call_graph = False , force_relink = True ) benchmark_results [ 'Speedometer2.0' ] = self . _PerformanceBenchmark ( self . _compiler . chrome_apk ) benchmark_results [ 'orderfile.memory_mobile' ] = ( self . _NativeCodeMemoryBenchmark ( self . _compiler . chrome_apk ) ) except Exception as e : benchmark_results [ 'Error' ] = str ( e ) finally : if no_orderfile and os . path . exists ( backup_orderfile ) : shutil . move ( backup_orderfile , orderfile_path ) _StashOutputDirectory ( out_directory ) return benchmark_results
Builds chrome apk and runs performance and memory benchmarks.
Builds chrome apk and runs performance and memory benchmarks .
"""Builds chrome apk and runs performance and memory benchmarks.

    Builds a non-instrumented version of chrome.
    Installs chrome apk on the device.
    Runs Speedometer2.0 benchmark to assess performance.
    Runs system_health.memory_mobile to evaluate memory footprint.

    Args:
      out_directory: (str) Path to out directory for this build.
      no_orderfile: (bool) True if chrome to be built without orderfile.

    Returns:
      benchmark_results: (dict) Results extracted from benchmarks.
    """ # Build APK to be installed on the device.
(dict) Results extracted from benchmarks.
( dict ) Results extracted from benchmarks .
benchmark_results
self
out_directory
(str) Path to out directory for this build.
( str ) Path to out directory for this build .
no_orderfile
(bool) True if chrome to be built without orderfile.
( bool ) True if chrome to be built without orderfile .