From b3cbc64e9a6d9c2ddea09fc46f16b669aa946741 Mon Sep 17 00:00:00 2001 From: James Robinson Date: Thu, 9 Apr 2015 16:51:38 -0700 Subject: [PATCH] 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 --- tools/skydb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/skydb b/tools/skydb index f8757f2557f..8ef14abf07f 100755 --- a/tools/skydb +++ b/tools/skydb @@ -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):