def graph(args): """graph subcommand. Reads in the trace sqlite3 database and writes out a graph in GraphViz DOT format. """ if args.pack is not None: rpz_pack = RPZPack(args.pack) with rpz_pack.with_config() as config: with rpz_pack.with_trace() as trace: generate(Path(args.target[0]), config, trace) else: tracedir = Path(args.dir) generate(Path(args.target[0]), tracedir / 'config.yml', tracedir / 'trace.sqlite3', args.all_forks)
def provgraph(args): """provgraph subcommand. Reads in the trace sqlite3 database and writes out a graph in Provenance Viewer graph format.""" def call_generate(args, config, trace): generate(Path(args.target[0]), config, trace) if args.pack is not None: rpz_pack = RPZPack(args.pack) with rpz_pack.with_config() as config: with rpz_pack.with_trace() as trace: call_generate(args, config, trace) else: call_generate(args, Path(args.dir) / 'config.yml', Path(args.dir) / 'trace.sqlite3')
def graph(args): """graph subcommand. Reads in the trace sqlite3 database and writes out a graph in GraphViz DOT format or JSON. """ def call_generate(args, config, trace): generate(Path(args.target[0]), config, trace, args.all_forks, args.format, args.packages, args.processes, args.otherfiles, args.regex_filter, args.regex_replace, args.aggregate) if args.pack is not None: rpz_pack = RPZPack(args.pack) with rpz_pack.with_config() as config: with rpz_pack.with_trace() as trace: call_generate(args, config, trace) else: call_generate(args, Path(args.dir) / 'config.yml', Path(args.dir) / 'trace.sqlite3')