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

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

Issue 2474573002: Convert chart-json to Histograms. (Closed)
Patch Set: test with tir label 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..0d2afefce9d1610cfd64ab63b0325b2df60a2b08
--- /dev/null
+++ b/tracing/tracing/value/convert_chart_json_cmdline.html
@@ -0,0 +1,20 @@
+<!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/base/xhr.html">
+<link rel="import" href="/tracing/value/chart_json_converter.html">
+<link rel="import" href="/tracing/value/histogram_set.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.ChartJsonConverter.convertChartJson(charts, histograms);
+ console.log(JSON.stringify([...histograms].map(h => h.asDict())));
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698