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

Unified Diff: tracing/tracing/value/convert_chart_json_cmdline.html

Issue 2474573002: Convert chart-json to Histograms. (Closed)
Patch Set: . Created 4 years, 1 month 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
Index: tracing/tracing/value/convert_chart_json_cmdline.html
diff --git a/tracing/tracing/value/convert_chart_json_cmdline.html b/tracing/tracing/value/convert_chart_json_cmdline.html
new file mode 100644
index 0000000000000000000000000000000000000000..710e48620ffd7a47b7609409fc9a1dc277bf0984
--- /dev/null
+++ b/tracing/tracing/value/convert_chart_json_cmdline.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<!--
+Copyright 2016 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.
+-->
+
+<link rel="import" href="/tracing/value/convert_chart_json.html">
+
+<script>
+'use strict';
+if (tr.isHeadless) {
+ var charts = JSON.parse(tr.b.getSync('file://' + sys.argv[1]));
+ var histograms = new tr.v.HistogramSet();
+ tr.v.convertChartJson(charts, histograms);
+ console.log(JSON.stringify([...histograms].map(h => h.asDict())));
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698