提交 b3cbc64e 编写于 作者: J James Robinson

Generate trace header/footer in tracing consumer instead of service

Having the output of the tracing service be a list of json objects
instead of one json object makes it much easier to combine multiple
sources. This teaches skydb (which wants to format the output into a
json file loadable by trace-viewer) to emit the tracing header/footer
itself. This will make it possible to combine data from the tracing
service with data collected by the shell itself.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1065093003
上级 8c8ad532
......@@ -356,7 +356,9 @@ class SkyDebugger(object):
file_name = args.file_name
trace = self._send_command_to_sky('/stop_tracing').content
with open(file_name, "wb") as trace_file:
trace_file.write('{"traceEvents":[')
trace_file.write(trace)
trace_file.write(']}')
print "Trace saved in %s" % file_name
def stop_profiling_command(self, args):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册