Exemplo n.º 1
0
def convert_dump(args):
    if os.path.isfile(args.dumpfile):
        if os.path.exists(args.tracefile):
            os.remove(args.tracefile)
            assert (not os.path.exists(args.tracefile))
        print("Converting dump %s -> %s" % (args.dumpfile, args.tracefile))
        td = trace.TraceDumpReader(args.dumpfile)
        trace.write_to_file(args.tracefile, list(td.traces()))
    else:
        print("error: %s not found" % (args.dumpfile))
        sys.exit(1)
Exemplo n.º 2
0
Arquivo: trace.py Projeto: btr-bot/osv
def convert_dump(args) :
    if os.path.isfile(args.dumpfile):
        if os.path.exists(args.tracefile):
            os.remove(args.tracefile)
            assert(not os.path.exists(args.tracefile))
        print "Converting dump %s -> %s" % (args.dumpfile, args.tracefile)
        td = trace.TraceDumpReader(args.dumpfile)
        trace.write_to_file(args.tracefile, list(td.traces()))
    else:
        print("error: %s not found" % (args.dumpfile))
        sys.exit(1)
Exemplo n.º 3
0
def save_traces_to_file(filename):
    trace.write_to_file(filename, list(all_traces()))
Exemplo n.º 4
0
def save_traces_to_file(filename):
    trace.write_to_file(filename, list(all_traces()))