How to use the snakeviz.cli.SVArgumentParser function in snakeviz

To help you get started, we’ve selected a few snakeviz examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jiffyclub / snakeviz / snakeviz / cli.py View on Github external
def build_parser():
    parser = SVArgumentParser(
        description='Start SnakeViz to view a Python profile.')

    parser.add_argument('filename', help='Python profile to view')

    parser.add_argument('-v', '--version', action='version',
                        version=('%(prog)s ' + version.version))

    parser.add_argument('-H', '--hostname', metavar='ADDR', default='127.0.0.1',
                        help='hostname to bind to (default: %(default)s)')

    parser.add_argument('-p', '--port', type=int, metavar='PORT', default=8080,
                        help='port to bind to; if this port is already in use a '
                             'free port will be selected automatically '
                             '(default: %(default)s)')

    parser.add_argument('-b', '--browser', metavar='BROWSER_PATH',