Index: systrace/systrace/tracing_controller.py |
diff --git a/systrace/systrace/tracing_controller.py b/systrace/systrace/tracing_controller.py |
index e6f4d6dae14ef2e8121d70fda33e4ebfe2dcea8c..317a4b6a290817b8aaab2f3e2a07c6bcfa17610a 100644 |
--- a/systrace/systrace/tracing_controller.py |
+++ b/systrace/systrace/tracing_controller.py |
@@ -10,6 +10,7 @@ manages the clock sync process. |
''' |
import ast |
+import json |
import sys |
import py_utils |
import tempfile |
@@ -74,9 +75,15 @@ class TracingControllerAgent(tracing_agents.TracingAgent): |
This output only contains the "controller side" of the clock sync records. |
""" |
with open(self._log_path, 'r') as outfile: |
- result = outfile.read() + ']' |
+ data = ast.literal_eval(outfile.read() + ']') |
+ formatted_data = { |
charliea (OOO until 10-5)
2017/03/21 19:47:23
This seems like it's probably a hack, and that the
rnephew (Reviews Here)
2017/03/23 15:14:15
Done.
|
+ 'traceEvents': data, |
+ 'metadata': { |
+ 'clock-domain': 'SYSTRACE', |
+ } |
+ } |
return trace_result.TraceResult(TRACE_DATA_CONTROLLER_NAME, |
- ast.literal_eval(result)) |
+ json.dumps(formatted_data)) |
def SupportsExplicitClockSync(self): |
"""Returns whether this supports explicit clock sync. |