Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Unified Diff: tracing/tracing/value/histograms_to_csv.py

Issue 3003163002: Add CsvOutputFormatter to Telemetry. (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/value/histogram.html ('k') | tracing/tracing/value/histograms_to_csv_cmdline.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/value/histograms_to_csv.py
diff --git a/tracing/tracing/value/histograms_to_csv.py b/tracing/tracing/value/histograms_to_csv.py
new file mode 100644
index 0000000000000000000000000000000000000000..ce1b90f55b10ba5f53837ddd19ac98f93834e9be
--- /dev/null
+++ b/tracing/tracing/value/histograms_to_csv.py
@@ -0,0 +1,22 @@
+# Copyright 2017 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+import vinn
+import tracing_project
+
+def HistogramsToCsv(json_path):
+ """Convert HistogramSet JSON to CSV.
+
+ Args:
+ json_path: path to a file containing HistogramSet JSON
+
+ Returns:
+ a Vinn result object whose 'returncode' indicates whether there was an
+ exception, and whose 'stdout' contains CSV.
+ """
+ return vinn.RunFile(
+ os.path.join(os.path.dirname(__file__), 'histograms_to_csv_cmdline.html'),
+ source_paths=list(tracing_project.TracingProject().source_paths),
+ js_args=[os.path.abspath(json_path)])
« no previous file with comments | « tracing/tracing/value/histogram.html ('k') | tracing/tracing/value/histograms_to_csv_cmdline.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698