How to use the timemory.plotting function in timemory

To help you get started, we’ve selected a few timemory 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 NERSC / timemory / timemory / plotting / __main__.py View on Github external
data = []
        for i in range(len(args.files)):
            f = open(args.files[i], "r")
            _data = _plotting.read(json.load(f))
            _data.filename = args.files[i].replace('.json', '')
            if len(args.titles) == 1:
                _data.title = args.titles[0]
            else:
                _data.title = args.titles[i]
            _data.plot_params = params
            print('### --> Processing "{}" from "{}"...'.format(_data.title,
                                                                args.files[i]))
            data.append(_data)

        if do_plot_max:
            _plotting.plot_maximums(args.plot_max,
                                    args.titles[0],
                                    data,
                                    plot_params=params,
                                    display=args.display_plot,
                                    output_dir=args.output_dir,
                                    echo_dart=args.echo_dart)
        else:
            _plotting.plot(data=data,
                           plot_params=params,
                           display=args.display_plot,
                           combine=args.combine,
                           output_dir=args.output_dir,
                           echo_dart=args.echo_dart)

    except Exception as e:
        exc_type, exc_value, exc_traceback = sys.exc_info()