parameters: ()
return_statement: return parser
docstring: Returns the options parser for run-bisect-perf-regression.py.
docstring_summary: Returns the options parser for run-bisect-perf-regression.py.
docstring_tokens: Returns the options parser for run - bisect - perf - regression . py .
function: def _OptionParser():
    """Returns the options parser for run-bisect-perf-regression.py."""
  
    def ConvertJson(option, _, value, parser):
      """Provides an OptionParser callback to unmarshal a JSON string."""
      setattr(parser.values, option.dest, json.loads(value))
  
    usage = ('%prog [options] [-- chromium-options]\n'
             'Used by a try bot to run the bisection script using the parameters'
             ' provided in the auto_bisect/bisect.cfg file.')
    parser = optparse.OptionParser(usage=usage)
    parser.add_option('-w', '--working_directory',
                      type='str',
                      help='A working directory to supply to the bisection '
                      'script, which will use it as the location to checkout '
                      'a copy of the chromium depot.')
    parser.add_option('-p', '--path_to_goma',
                      type='str',
                      help='Path to goma directory. If this is supplied, goma '
                      'builds will be enabled.')
    parser.add_option('--path_to_config',
                      type='str',
                      help='Path to the config file to use. If this is supplied, '
                      'the bisect script will use this to override the default '
                      'config file path. The script will attempt to load it '
                      'as a bisect config first, then a perf config.')
    parser.add_option('--extra_src',
                      type='str',
                      help='Path to extra source file. If this is supplied, '
                      'bisect script will use this to override default behavior.')
    parser.add_option('--dry_run',
                      action="store_true",
                      help='The script will perform the full bisect, but '
                      'without syncing, building, or running the performance '
                      'tests.')
    # This argument is passed by buildbot to supply build properties to the bisect
    # script. Note: Don't change "--build-properties" property name.
    parser.add_option('--build-properties', action='callback',
                      dest='build_properties',
                      callback=ConvertJson, type='string',
                      nargs=1, default={},
                      help='build properties in JSON format')
  
    return parser
function_tokens: def _OptionParser ( ) : def ConvertJson ( option , _ , value , parser ) : """Provides an OptionParser callback to unmarshal a JSON string.""" setattr ( parser . values , option . dest , json . loads ( value ) ) usage = ( '%prog [options] [-- chromium-options]\n' 'Used by a try bot to run the bisection script using the parameters' ' provided in the auto_bisect/bisect.cfg file.' ) parser = optparse . OptionParser ( usage = usage ) parser . add_option ( '-w' , '--working_directory' , type = 'str' , help = 'A working directory to supply to the bisection ' 'script, which will use it as the location to checkout ' 'a copy of the chromium depot.' ) parser . add_option ( '-p' , '--path_to_goma' , type = 'str' , help = 'Path to goma directory. If this is supplied, goma ' 'builds will be enabled.' ) parser . add_option ( '--path_to_config' , type = 'str' , help = 'Path to the config file to use. If this is supplied, ' 'the bisect script will use this to override the default ' 'config file path. The script will attempt to load it ' 'as a bisect config first, then a perf config.' ) parser . add_option ( '--extra_src' , type = 'str' , help = 'Path to extra source file. If this is supplied, ' 'bisect script will use this to override default behavior.' ) parser . add_option ( '--dry_run' , action = "store_true" , help = 'The script will perform the full bisect, but ' 'without syncing, building, or running the performance ' 'tests.' ) # This argument is passed by buildbot to supply build properties to the bisect # script. Note: Don't change "--build-properties" property name. parser . add_option ( '--build-properties' , action = 'callback' , dest = 'build_properties' , callback = ConvertJson , type = 'string' , nargs = 1 , default = { } , help = 'build properties in JSON format' ) return parser