parameters: (self, apk, package_info)
return_statement: return data
docstring: Run a profile and collect the log files.
  
      Args:
        apk: The location of the chrome apk to profile.
        package_info: A PackageInfo structure describing the chrome apk,
                      as from pylib/constants.
      Returns:
        A list of cygprofile data files.
      Raises:
        NoCyglogDataError: No data was found on the device.
docstring_summary: Run a profile and collect the log files.
docstring_tokens: Run a profile and collect the log files .
function: def CollectProfile(self, apk, package_info):
      """Run a profile and collect the log files.
  
      Args:
        apk: The location of the chrome apk to profile.
        package_info: A PackageInfo structure describing the chrome apk,
                      as from pylib/constants.
      Returns:
        A list of cygprofile data files.
      Raises:
        NoCyglogDataError: No data was found on the device.
      """
      self._Install(apk)
      try:
        changer = self._SetChromeFlags(package_info)
        self._SetUpDeviceFolders()
        # Start up chrome once with a blank page, just to get the one-off
        # activities out of the way such as apk resource extraction and profile
        # creation.
        self._StartChrome(package_info, 'about:blank')
        time.sleep(15)
        self._KillChrome(package_info)
        self._SetUpDeviceFolders()
        with WprManager(self._WPR_ARCHIVE, self._device,
                        package_info.cmdline_file):
          self._StartChrome(package_info, self._TEST_URL)
          time.sleep(90)
          self._KillChrome(package_info)
      finally:
        self._RestoreChromeFlags(changer)
  
      data = self._PullCyglogData()
      self._DeleteDeviceData()
      return data
function_tokens: def CollectProfile ( self , apk , package_info ) : self . _Install ( apk ) try : changer = self . _SetChromeFlags ( package_info ) self . _SetUpDeviceFolders ( ) # Start up chrome once with a blank page, just to get the one-off # activities out of the way such as apk resource extraction and profile # creation. self . _StartChrome ( package_info , 'about:blank' ) time . sleep ( 15 ) self . _KillChrome ( package_info ) self . _SetUpDeviceFolders ( ) with WprManager ( self . _WPR_ARCHIVE , self . _device , package_info . cmdline_file ) : self . _StartChrome ( package_info , self . _TEST_URL ) time . sleep ( 90 ) self . _KillChrome ( package_info ) finally : self . _RestoreChromeFlags ( changer ) data = self . _PullCyglogData ( ) self . _DeleteDeviceData ( ) return data