How to use the snakeviz.cli 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 inpho / topic-explorer / topicexplorer / __main__.py View on Github external
benchmark(metadata.main)(args)
    
    elif args.func == 'export':
        benchmark(export.main)(args)

    elif args.func == 'export-html':
        benchmark(export_html.main)(args)

    elif args.func == 'import':
        benchmark(tezimport.main)(args)

    if args.profile:
        try:
            import snakeviz.cli
            print("\n\n")
            snakeviz.cli.main([args.profile])
        except ImportError:
            print("""\nSnakeviz is not installed. Install with `pip install snakeviz`,
            then run `snakeviz {}`.""".format(args.profile))
    
    if platform.system() == 'Windows':
        win_unicode_console.disable()