tools/perf/cli_tools/pinpoint_cli/commands.py
def StartJobFromConfig(config_path):
  """Start a pinpoint job based on a config file."""
  src = sys.stdin if config_path == '-' else open(config_path)
  with src as f:
    config = json.load(f)

  if not isinstance(config, dict):
    raise ValueError('Invalid job config')

  # An absent comparison_mode denotes a tryjob configuration.
  if 'comparison_mode' not in config:
    config['comparison_mode'] = 'try'

  # As of crrev.com/c/1965875 try jobs must specify a base git hash.
  if config['comparison_mode'] == 'try' and 'base_git_hash' not in config:
    config['base_git_hash'] = config['start_git_hash']
    del config['start_git_hash']
    del config['end_git_hash']

  response = pinpoint_service.NewJob(**config)
  print('Started:', response['jobUrl'])
Start a pinpoint job based on a config file.
Start a pinpoint job based on a config file.
Start a pinpoint job based on a config file .
def StartJobFromConfig(config_path):
  src = sys.stdin if config_path == '-' else open(config_path)
  with src as f:
    config = json.load(f)
  if not isinstance(config, dict):
    raise ValueError('Invalid job config')
  if 'comparison_mode' not in config:
    config['comparison_mode'] = 'try'
  if config['comparison_mode'] == 'try' and 'base_git_hash' not in config:
    config['base_git_hash'] = config['start_git_hash']
    del config['start_git_hash']
    del config['end_git_hash']
  response = pinpoint_service.NewJob(**config)
  print('Started:', response['jobUrl'])
def StartJobFromConfig ( config_path ) : src = sys . stdin if config_path == '-' else open ( config_path ) with src as f : config = json . load ( f ) if not isinstance ( config , dict ) : raise ValueError ( 'Invalid job config' ) if 'comparison_mode' not in config : config [ 'comparison_mode' ] = 'try' if config [ 'comparison_mode' ] == 'try' and 'base_git_hash' not in config : config [ 'base_git_hash' ] = config [ 'start_git_hash' ] del config [ 'start_git_hash' ] del config [ 'end_git_hash' ] response = pinpoint_service . NewJob ( ** config ) print ( 'Started:' , response [ 'jobUrl' ] )
Start a pinpoint job based on a config file.
Start a pinpoint job based on a config file .
"""Start a pinpoint job based on a config file.""" # An absent comparison_mode denotes a tryjob configuration. # As of crrev.com/c/1965875 try jobs must specify a base git hash.
config_path