##// END OF EJS Templates
py3: for statprof's Chrome output, write json to string, then encode to bytes...
Martin von Zweigbergk -
r43104:cd3b5be5 default
parent child Browse files
Show More
@@ -875,7 +875,10 b' def write_to_chrome(data, fp, minthresho'
875 if idx not in blacklist]
875 if idx not in blacklist]
876 frames = collections.OrderedDict((str(k), v)
876 frames = collections.OrderedDict((str(k), v)
877 for (k,v) in enumerate(id2stack))
877 for (k,v) in enumerate(id2stack))
878 json.dump(dict(traceEvents=events, stackFrames=frames), fp, indent=1)
878 data = json.dumps(dict(traceEvents=events, stackFrames=frames), indent=1)
879 if not isinstance(data, bytes):
880 data = data.encode('utf-8')
881 fp.write(data)
879 fp.write('\n')
882 fp.write('\n')
880
883
881 def printusage():
884 def printusage():
General Comments 0
You need to be logged in to leave comments. Login now