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

Unified Diff: tracing/tracing/metrics/all_histogram_names_cmdline.html

Issue 2656493002: Register metric Histogram names. (Closed)
Patch Set: rebase Created 3 years, 10 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/metrics/all_histogram_names.py ('k') | tracing/tracing/metrics/blink/gc_metric.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/metrics/all_histogram_names_cmdline.html
diff --git a/tracing/tracing/metrics/all_histogram_names_cmdline.html b/tracing/tracing/metrics/all_histogram_names_cmdline.html
new file mode 100644
index 0000000000000000000000000000000000000000..95add8a1ce783e30d0cc6bfd415782b496f306b8
--- /dev/null
+++ b/tracing/tracing/metrics/all_histogram_names_cmdline.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<!--
+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.
+-->
+
+<link rel="import" href="/tracing/metrics/all_metrics.html">
+
+<script>
+'use strict';
+
+if (tr.isHeadless) {
+ var metricNames = new Set(sys.argv.slice(1));
+ var histogramNames = [];
+ for (var typeInfo of tr.metrics.MetricRegistry.getAllRegisteredTypeInfos()) {
+ if (metricNames.has(typeInfo.constructor.name)) {
+ histogramNames.push(...typeInfo.metadata.histogramNames);
+ }
+ }
+ console.log(JSON.stringify(histogramNames));
+}
+</script>
« no previous file with comments | « tracing/tracing/metrics/all_histogram_names.py ('k') | tracing/tracing/metrics/blink/gc_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698