def done(self): self.stop() context = profilingContext(self.context.roots) # print(context.methods) with open("python-profiler-result.jandy", "w") as f: tp = TFileObjectTransport(f) context.write(TJSONProtocol(tp)) tp.flush()
def done(self): self.stop() context = profilingContext(self.context.roots()) with open("python-profiler-result.jandy", "wt") as f: json.dump(context, f)